I have an array of objects and I want to remove one of the objects.
[
{"field":"ingredients","gte":"egg","lte":"egg"},
{"field":"ingredients","gte":"bakepulver","lte":"bakepulver"},
{"field":"ingredients","gte":"hvetemel","lte":"hvetemel"}
]
I don't know the index of the object I want to remove, but I know the whole object. I.e:
{"field":"ingredients","gte":"bakepulver","lte":"bakepulver"}
I need to find the object's index by it's full content (all properties), not just by field, gte or lte. How do I find object's index in the array with just plain JavaScript?
findIndex!field,gteandlte. Andgteandltecan be different from each other.