I have JSON that has to conform to this standard.
{
"level": [
{
"1": {
"Title": "My First Title",
"Body": "My First Body"
}
},
{
"2": {
"Title": "My Second Title",
"Body": "My Second Body"
}
}
}
Whilst I know it's not the best formed JSON in the world, it has to stay like this for integration into a complex system. I have not been successful in finding a way of querying everything inside the "first level". I only need to ever strip the json by the "1", "2", "3", keys.
The SQL equivilant would be:
SELECT Title, Body FROM level WHERE level.id = 1.
I'm struggling because there is no id. the key is the id therefore I do not know what to search on.
Returned JSON should be:
{
"Title": "My First Title",
"Body": "My First Body"
}