I have a 2d array containing data like the following:
[
[ 'name', 'mike' ],
[ 'type', 'person' ],
[ 'age', '24' ]
]
I need to access the value of the second element of the inner array, based on the value of the first element in the inner array.
So basically I want to specify "name" and in return, receive the value "mike". How can I accomplish this without looping through the entire array?
{ name: "mike", type: "person", age: 24 }