Quantcast
Channel: MySQL Forums - InnoDB
Viewing all articles
Browse latest Browse all 1957

How to extract "@xsi:type" attribute from json-type column (no replies)

$
0
0
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?

Viewing all articles
Browse latest Browse all 1957

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>