M
M
marly132019-01-09 20:33:11
HTML
marly13, 2019-01-09 20:33:11

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

1 answer(s)
E
Eugene, 2019-01-09
@iamd503

It's better to make a separate json

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question