var jsonArray = ["test", "test1", "test2"];
var matchedValue = "test1";
I want to remove remove and (matchedValue) from the JsonArray. How can i delete and return rest of the string
Expected output : ["test", "test2"];
What I am doing :
var setValue = JSON.parse(fetchMethodJsonArray);
dataRemoved = setValue.filter(function(el) {
return el != fetchValue;
});
It is not working
Please tell me the solution Thanks in advance.
fetchValuehas data.setValueis an array.