I have an array which looks looks like this –
list = [{"doc":{"id": "123", "name":"abc"}}, {"doc":{"id": "345", "name":"xyz"}},{"doc":{"id": "123", "name":"str"}}]
How can I use the _.each method to retrieve the doc object with id =”123″ ? Any help is greatly appreciated.
Cheers!
Read up on how jQuery.each handles break;