2020-04-30

JavaScript - Find a children object by key/value using Underscore.js

let child_object
   _.find(
     parent_object
     , function (o) { 
       return o.key_to_search_by === value_searched
     }
   );

No comments:

Post a Comment