Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xyz = [{category: "Desktop product", options: ['a']},
- {category: "Cloud service", options:['b']},
- ]
- abc = [{category: "Desktop product", options: ['x']},
- {category: "Cloud product", options: ['c']}]
- result = [{category: "Desktop product", options: ['a','x']},
- {category: "Cloud service", options:['b']},
- {category: "Cloud product", options: ['c']}]
- I tried :
- abc
- .filter(d => categoryList.includes(d.usageCategory))
- .concat(xyz);
- but it doesnt work
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement