I have saved the json data in mysql database column which looks like below
[{"one":"mg road plot number 711 xyz"},{"two":"dc road plot number 711 xyz"}]
json data like above is being stored for all the records with different address. So what I am trying to do is , I want to search all the customer who are having address of mg road.
So I have tried JSON_SEARCH and JSON_CONTAINS but it always returning me no records found even though there are 2 records in a table. So where I am going wrong.
SELECT * FROM `tbl_clients_data` WHERE JSON_SEARCH(reci_address,'all', "mg road")
SELECT * FROM `tbl_clients_data` WHERE JSON_CONTAINS(reci_address, 'mg road', '$.one')