Details
-
Task
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Duplicate
-
None
Description
Hello.
Is it possible to make "for" sentece support JSON arrays? For example:
declare json_string varchar(1024) default '[ |
{"rdbms":"MySQL/MariaDB","tag":"Rocks!"}, |
{"rdbms":"Oracle Database","tag":"It\'s fine"}, |
{"rdbms":"IBM DB2","tag":"Available in z/OS"}, |
{"rdbms":"Microsoft SQL Server","tag":"No comments"} |
]';
|
|
for rdbms in json_query(json_string, '$') do |
-- Do something with current iteration's object.
|
select json_value(rdbms, '$.rdbms'), json_value(rdbms, '$.tag'); |
end for; |
|
Regards.
Attachments
Issue Links
- is part of
-
MDEV-17399 Add support for JSON_TABLE
- Closed