I am storing the json array in the mysql field called member_details,
[{"religion":null,"caste":["2","3","4"],"sub_caste":["0","1","2"],"family_value":null,"family_status":null}]
Now, I want to search for the members who are having caste of 3. Some times I need to search for sub_caste 2.
How can i achieve that?
I have tried to use json_contains but it is giving me empty results
select * from member where json_contains('member_details', '{"caste" : "2"}')
but it gives empty result.