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"] } ]
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"] } ]