I have a very complex object that looks like this:
[
{type: "type", data: {a ton more stuff}},
//with tons of these objects.
]
What I am wondering is if all 'type' keys are unique, could I get the object within the array with the given type or will I need to loop through the json array every time?? What I really need is the data, but I only know the type. This is a database schema that is not mine so unfortunately I cannot change the object.