With the data structured as above, you would need to iterate through each array element (it isn’t a dictionary so no key value pair to utilise) and get the resulting dictionary. Then if the name value in that dictionary matches your search term, you return the value of the id entry in the dictionary.
If your actual data set is large, I would also consider adding an additional flag to say whether to bother reading in any additional array elements after a match is made.
If you happen to have control over the data structure, then you could make it more efficient, but otherwise, it is just standard approach for each of the two data structures - iterate over the array elements and reference the object properties.