I have this code below i'm trying to remove the entire row {"id": "Apple", "group": 1} by comparing the graph with the testArray to see for each object that the graph have in common with the testArray just remove the entire row. But i'm not really sure on how to complete remove it any help would be greatly appreciated
var graph = { "nodes": [
{"id": "Apple", "group": 1},
{"id": "Cherry", "group": 2},
{"id": "Tomato", "group": 3}
],
"links": [
{"source": "Apple", "target": "Cherry", "value": 1},
{"source": "Cherry", "target": "Tomato", "value": 1},
{"source": "Tomato", "target": "Apple", "value": 1}
]
};
var testArray = ['Apple'];
var nodes = graph["nodes"];
let removeNodes = nodes;
removeNodes.forEach((obj) => {
if (testArray.includes(obj.id.toString()))
});