SyntaxFix
Write A Post
Hire A Developer
Questions
Use the filter method of jQuery:
$(myArray).filter(function() { return this.id == desiredId; }).first();
That will return the first element with the specified Id.
It also has the benefit of a nice C# LINQ looking format.