This code currently searches the result array for where the name is "abc" and removes the entire index. How can I make it so it checks for name contains "abc". ie. name could be "abcd" and would still be removed.
var i;
for (i = result.length; i--;) {
if (result[i].name === "abc") {
result.splice(i, 1);
}
}
result is a JSON like
[{"name": "aaa", "number": "123"},{"name": "abc", "number": "456"},{"name": "abcd", "number": "789"},]