I make an online store using json to display products in conjunction with javascript and jquery. In json, I keep goods from one category, they are displayed on the page "women's sports clothing."
The question is, if I add products from all categories to the same array, with the help of which function can I display only the necessary goods on different category pages?
That is, how to make a selection from json? You need exactly the code that performs this, if possible.
If this method is wrong, then it is better to create your own json file for each category of goods?
Here is the json part of the file:
{ "1234": { "name": "spodnie", "cost":60, "description": "spodnie bawelniane", "orer":1, "img":"leggins/50.jpg" }, function code is needed in javascript