error calling method 'indexof(string)' on an object of type 'array javascript object ' code example
Example: using index of on array of objects
arr = [{x: "a", y: 1}, {x: "something", y: 2}]
arr.findIndex(obj => obj.x === "a" && obj.y === 1);
arr = [{x: "a", y: 1}, {x: "something", y: 2}]
arr.findIndex(obj => obj.x === "a" && obj.y === 1);