How to search JSON data in MySQL?

By | January 30, 2019

If you have JSON type columns in your database and want to run query on JSON type field. You can use the following query.

SELECT JSON_EXTRACT('<json_column>', "$.response") AS name
FROM table
WHERE JSON_EXTRACT('<json_column>', "$.id") > 3

In the above query <json_column> must be replace by your column name.

$.id and $.response contains the JSON key of your columns. You can use for multiple values also.

For example : $.response.name

One thought on “How to search JSON data in MySQL?

  1. que es avg pc tuneup

    I’m still learning from you, but I’m improving myself. I certainly love reading all that is posted on your site.Keep the tips coming. I liked it!

Leave a Reply