MySQL Forums
Forum List  »  InnoDB

How to extract "@xsi:type" attribute from json-type column
Posted by: harry sheng
Date: October 26, 2015 07:21AM

Hi,

I've stored data in a json type column in mysql 5.7.9. The json data has an attribute named "@xsi:type", what is the mysql syntax to extract that attribute from the json data?

The following works:
select json_extract(json_object, '$.description') from json_table;

But the following does NOT work:
select json_extract(json_object, '$.@xsi:type') from json_table;

Do I need to escape the @ and : in the attribute name? How?

Options: ReplyQuote


Subject
Views
Written By
Posted
How to extract "@xsi:type" attribute from json-type column
1598
October 26, 2015 07:21AM


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.