Example:
<div data-object="{ 'foo' : 123 }"></div>
<div data-object="{ 'foo' : 456 }"></div>
What would be the fastest way to find the div with foo value 123? At the moment im looping through the divs, converting the stringified object to a js object and check if the foo value is equal to 123? Can this be done without a loop? Thanks
You could use filter()
This does still use a loop internally though.