I have the following sql tables enter image description here
Now I want to get all the data in a single query I am using Node.JS and I wrote the following query
SELECT * FROM person_table INNER JOIN event_table ON person_table.person_id = event_table.person_id
Now I get the following response enter image description here
but I want output as follows which is nested json format enter image description here
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.