Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

extract data from object when it match with array of ids js

 const keep = new Set(['id4', 'id2']);

 const result = [];

 for(const items of Object.values(data.items))
   for(const item of items)
     if(keep.has(item.id))
       result.push(item);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extract #data #object #match #array #ids #js
ADD COMMENT
Topic
Name
9+7 =