MySQL Forums
Forum List  »  General

Re: Expand JSON_TABLE functionality
Posted by: Alfredo Kojima
Date: December 07, 2018 11:55AM

You could use JSON_KEYS() to extract the keys of and JSON_TABLE() to iterate on them:

select k, json_extract(doc, concat('$.', k)) as v from doc, json_table(json_keys(doc), '$[*]' columns (k varchar(10) path '$')) j;

--
Alfredo Kojima
MySQL Developer Tools

Options: ReplyQuote


Subject
Written By
Posted
Re: Expand JSON_TABLE functionality
December 07, 2018 11:55AM


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.