How can I find path to object with property "is_true": true?
JSON in data column:
[
{
"myData": {},
"is_true": true
},
{
"myData": {},
"is_true": false
},
{
"myData": {},
"is_true": false
}
]
Failed attempts:
SELECT JSON_SEARCH(data, "all", true) AS booleanObject FROM my_table
and...
SELECT JSON_SEARCH(data, "all", "true") AS booleanObject
SELECT JSON_SEARCH(data, "all", "%true%") AS booleanObject
SELECT JSON_SEARCH(data, "all", true) AS booleanObject
SELECT JSON_SEARCH(data, "all", 1) AS booleanObject
SELECT JSON_SEARCH(data, "all", true, NULL, "$") AS booleanObject
etc.
$[0].is_trueelse paths contain "false" values$[1].is_true, $[2].is_trueetc.