Fetching Content

<body>
    <button onclick="read()">Retrieve Data</button>
    <p id="confirmation"></p>
</body>
function read() {
    document.getElementById("confirmation").innerText="Read function has been called";
}

fetch('http://localhost:8080')
  .then((response) => response.json())
  .then((data) => this.filterdata(data));

function filterdata(data) {
    console.log(data)
}

Filtering Content

function filter() {
        console.log("filtering")
        for (const row of data) {
            if (row["letter"] == "") {
                data.splice(data.indexOf(row), 1)
            }
        }
        document.getElementById("filteredData").innerText = "Filtered Data: " + JSON.stringify(data);
    }
<body>
    <button onclick="filter()">Filter Data</button>
    <p id="originalData"></p>
    <p id="filteredData">Filtered Data: </p>
</body>

Filtered Data:

Hacks

Note: Feel free to take inspiration from your CPT projects! This Big Idea and especially this part of it is essentially reviewing the things you did last trimester.