JSFiddle - React, Tailwind, and code Playground
by Simon060694
HTML
<div>
<h1>
Your results here
</h1>
</div>
JavaScript
const stores = [{_id:1,name:'mpowerpromo.com'},{_id:2,name:'amazon.com'}];
const categories=[{name:'Aparel',_id:1,stores:[1]},{name:'Bag',_id:2,stores:[1,2]},];
const facetGroup=[{_id:1,name:'Brand'},{_id:2,name:'Color'}];
const fasets = [{_id:1, name:'nike', facetGroup:1},{_id:2, name:'Black', facetGroup:2}];
const products=[{productId:'T-shrirt',categories:[1,2],facets:[1,2],_id:1},{productId:'school bag',facets:[2],categories:[1],_id:2},];
//create a function which return:
//1. List of all Bag products for mpowerpromo.com
//2. List of all products for amazon.com
//3. List of all Aparel nike products for amazon.com
//3. List of all Color products for amazon.com
//Require to render in html view instead `Your results here`, prefer to use native js features, you are welcome to use libraries if its easy for you