Answer the question
In order to leave comments, you need to log in
How to wrap each json object in an array?
Example: sqlfiddle.com/#!17/000c4c/1/0
There is a People table with the following. lines:
| ID | name | age |
| 773 | Katya | 21 |
| 828 | Masha | 23 |
| 999 | Danya | 41 |
| 999 | Vanya | 12 |
{
"773": {"ID": 773, "name": "Katya", "age": "21"},
"828": {"ID": 773, "name": "Masha", "age": "23"},
"999": {"ID": 773, "name": "Danya", "age": "41"}
}
{
"773": [
{"ID": 773, "name": "Katya", "age": "21"}
],
"828": [
{"ID": 828, "name": "Masha", "age": "23"}
],
"999": [
{"ID": 999, "name": "Danya", "age": "41"},
{"ID": 999, "name": "Vanya", "age": "12"}
]
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question