SQLite `json_tree` equivalent
Posted by: Hamish Allan
Date: February 09, 2023 11:10AM

Hi,

Does there exist in MySQL, or does anyone know of any plans to create, the equivalent of the `json_tree` table-valued function in SQLite?

SELECT fullKey, atom FROM json_tree('
{
"grandparent1": {
"parent1a": {
"child1a1": {
"name": "Alice"
},
"child1a2": {
"name": "Bob"
}
},
"parent1b": {
"child1b1": {
"name": "Carol"
}
}
}
}
');

$|
$.grandparent1|
$.grandparent1.parent1a|
$.grandparent1.parent1a.child1a1|
$.grandparent1.parent1a.child1a1.name|Alice
$.grandparent1.parent1a.child1a2|
$.grandparent1.parent1a.child1a2.name|Bob
$.grandparent1.parent1b|
$.grandparent1.parent1b.child1b1|
$.grandparent1.parent1b.child1b1.name|Carol

Many thanks,
Hamish

Options: ReplyQuote


Subject
Views
Written By
Posted
SQLite `json_tree` equivalent
140
February 09, 2023 11:10AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.