Comments - JSON_EXTRACT
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.
Problem with this function is that it skips non existing keys, making it impossible to know values from which keys was actually returned. JSON_EXTRACT('{"a": 1, "b":2}', '$.a', '$.x', '$.b'); #=> [1,2] We have JSON_REMOVE to remove some keys (not sure what's the use case) but there's no opposite. Solution - add a function like this: JSON_SELECT('{"a": 1, "b":2}', '$.a', '$.x', '$.b'); #=> {"a": 1, "b": 2} Or variant of JSON_EXTRACT that would put "null" for each missing key.