Answer the question
In order to leave comments, you need to log in
How to display only some (not the entire array) products from a json file?
Good evening!
I am making an online store using json to display products. In json, I store products from one category, they are displayed on the "women's sportswear" page.
The question is, if I add products from all categories to the same array, what function can I use to display only the products I need on different category pages?
That is, how to make a selection from json? We need exactly the code that does this, if possible.
If this method is wrong, do I need to create a separate json file for each product category?
Here is part of the file:
{
"1234": {
"name": "spodnie",
"cost":60,
"description": "spodnie bawelniane",
"orer":1,
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question