A
A
Ayan Bai2020-02-05 21:59:19
JavaScript
Ayan Bai, 2020-02-05 21:59:19

How to draw a grouped array?

Friends, we need your help! My stack is full and I can't resolve this issue.

I have an array of objects with products. Each item has a city. I want to show a table broken down by city. And when I choose a city, I want to show products for this city.

For a breakdown by city, I found a code on the net that takes the name of an object from an array and binds products to its property. In fact, everything is correct, but now it is not clear how their data is grouped?

Friends, help, your help is very necessary!.

I am attaching a part of the code that works for me with all the initial data on my working example

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question