Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. xyz = [{category: "Desktop product", options: ['a']},
  2. {category: "Cloud service", options:['b']},
  3. ]
  4.  
  5. abc = [{category: "Desktop product", options: ['x']},
  6. {category: "Cloud product", options: ['c']}]
  7.  
  8. result = [{category: "Desktop product", options: ['a','x']},
  9. {category: "Cloud service", options:['b']},
  10. {category: "Cloud product", options: ['c']}]
  11.  
  12. I tried :
  13. abc
  14. .filter(d => categoryList.includes(d.usageCategory))
  15. .concat(xyz);
  16.  
  17. but it doesnt work
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement