I have the following JSON-File in a MYSQL Database:
[
{
"order" : 0,
"value" : 0.168257
},
{
"order" : 0.031250,
"value" : 0.002387
},
{
"order" : 0.062500,
"value" : 0.002367
},
{
"order" : 0.093750,
"value" : 0.002365
},
{
"order" : 0.125000,
"value" : 0.002369
},
{
"order" : 0.156250,
"value" : 0.002384
},
{
"order" : 0.187500,
"value" : 0.002403
}
]
I would like to Query and get the result for "order"=0.156250 I use the following Query:
JSON_EXTRACT(jsonColumn,'$.order') ... WHERE JSON_EXTRACT(jsonColumn,'$.order') = 0.156250
It is not working. I can only select the Column by doing the following:
Select JSON_EXTRACT(jsonColumn,'$[5].order')
Can somebody tell me how to select the Column without giving the index to the Select statement?
Thanks!