Skip to content

Can I get nested json response in case of SQL queries containing joins? #152

@ancode4

Description

@ancode4

Eg: If I have a query _SELECT userid, name, pet_name, pet_type from users left join pets on pets.userid=users.userid

I get the response as
[ { "id": 1, "name": "Anish", "pet_name": "Meow", "pet_type": "Cat" }, { "id": 1, "name": "Anish", "pet_name": "Sparky", "pet_type": "Dog" } ]

Note here that the record is repeated for the join value. Can I instead get a nested json array for the repeated records? This way
[ { "id": 1, "name": "Anish", "pet_name": ["Meow","Sparky"], "pet_type": ["Cat","Dog"] } ]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions