JSON_KEYS

You are viewing an old version of this article. View the current version here.
MariaDB starting with 10.2.3

JSON functions were added in MariaDB 10.2.3.

Syntax

JSON_KEYS(json_doc[, path])

Description

Returns the keys as a JSON array from the top-level value of a JSON object or, if the optional path argument is provided, the top-level keys from the path. Returns NULL if any of the arguments are null, a given path does not locate an object, or if the json_doc argument is not an object.

An error will occur if JSON document is invalid, the path is invalid or if the path contains a * or ** wildcard.

Examples


    

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.