mercredi 31 août 2016

Underscore JS, find object which contains value in array

Im looking for a solution to find json object which contains a value in b. example: find objects which contain "jinx" in b.

sample data. [{ id:1 a:"karma", b:["jinx","caitlyn","tristana"] }, {....}, {....}]

I understand underscore works better for key/value pairs but this would be of great help.

Thanks.

Aucun commentaire:

Enregistrer un commentaire