I have an array of Objects with IDs. The Array looks something like this:
var array = [
{
"id": 0,
"name": "Test"
},
{
"id": 1,
"name": "Test2"
},
]
I'd like to know how I could now access an object that has a specific value in their attribute. I.e. I'd like to access the object with id = 0
or the object with `name = "Test2" and so on.
What's the most efficient way to do so?