2

Given the following JSON object used in MySQL 5.7 or later:

{"": 1}

What is the valid path syntax to extract the value from the JSON object with an empty string key?

select JSON_EXTRACT('{"":1}', '$.""');

The above SQL is the best of my understanding on how to setup correct the path syntax. However, the SQL yields the following error: Invalid JSON path expression. The error is around character position 4.

Any help in understanding the correct path syntax to operate on such an object would be most helpful.

avelis
  • 1,143
  • 1
  • 9
  • 18

1 Answers1

1

You might be up against a bug. Might require an upgrade to MySQL 5.8

https://bugs.mysql.com/bug.php?id=79643

avelis
  • 1,143
  • 1
  • 9
  • 18
eephillip
  • 1,183
  • 15
  • 25