im trying to remove from my JSON file one object from the array:
let json = [{
"name":"John",
"age":"29"
},
{
"name":"Billy",
"age":"45"
}];
I have an array that has the data to remove from JSON, it only has name in it
let remObj = ['John'];
Is it possible to remove only using name?
Edit:
I have tried Slice, Splice and filter
json.filter(p => !remObj.includes(p.name))let jsonmeans the data is just normal javascript data, not JSON