How i can use the json operator ->>

I read on a page that you can create queries in MariaDB using the ->> operator. Unfortunately this does not work in my MariaDB 10.11. What alternatives are there to search elements of an array in a JSON_SEARCH?

Answer Answered by Ian Gilfillan in this comment.

MariaDB doesn't support the ->> operator. You can use JSON_UNQUOTE and JSON_EXTRACT instead, for example:

SELECT JSON_UNQUOTE(JSON_EXTRACT('{"id":"1", "name":"Name"}', '$.name')) `name`;

If the feature is important to you, you can also comment/vote on the JIRA ticket: MDEV-13594. Can you share the page that stated you could use the ->> operator so we can try correct it?

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.