my mysql column named json:
{"myarray":[ { "users":"82,191", type":"3" } ]}
this is above table column json i want to find user with id 191. 82 working fine. but 191 not found.
my sql query is:
SELECT id
FROM tablename
WHERE JSON_EXTRACT(json, CONCAT('$.myarray[0].users') ) IN (82) --this is working
SELECT id
FROM tablename
WHERE JSON_EXTRACT(json, CONCAT('$.myarray[0].users') ) IN (191) --but this is not working. nothing fetched. empty results.
how can i fetch results if json has also 191 ?