G
G
goncho2018-12-10 17:51:20
JSON
goncho, 2018-12-10 17:51:20

How to get nested list after SELECT query?

I make such a query
SELECT docs.date , docTypes.name, docs.id , products.image, products.name , products.price, rows.quantity, products.removed FROM docs , docTypes , products , rows WHERE docTypes.id = docs. typeId
AND docs.id = rows.docId AND rows.productId = products.id GROUP BY products.name HAVING products.removed = 0 ORDER BY date ASC;
I generate such a json file
5c0e7c42c4f73134630487.png
. What should I change in the request so that a nested list is created for each object?
something like this
block
data
id
....
block
date
id
....

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