Re: How to extract value from JSON with common_schema?
Posted by: Alfredo Kengi Kojima
Date: December 02, 2016 10:36AM

Hi

I don't know what's common_schema, but in MySQL 5.7, you can do that with the following:

SET @json := '
{
"list": [
{"value": "New", "onclick": "CreateNewDoc()"},
{"value": "Open", "onclick": "OpenDoc()"},
{"value": "Close", "onclick": "CloseDoc()"}
]
}
';

SELECT json_extract(@json, '$.list.value') ;

--
Alfredo Kojima
MySQL Developer Tools

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to extract value from JSON with common_schema?
938
December 02, 2016 10:36AM


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.