MySQL table contacts
I have a JSON type column responses, which content is
{"1": ["Yes", "No", "Maybe"], "2": ["Yes"], "3": ""}
I would like to know if it's possible in SELECT statement -> WHERE clause to find out if first JSON element is equal with some given array (it would change).
My idea was something like this:
WHERE contacts.responses->>'$."1"' = JSON_ARRAY('Yes','No','Maybe')
but this doesn't work (even though when both comparison sides included in SELECT statement, they are displayed equally - '["Yes", "No", "Maybe"]'). So, is there any other way how to accomplish this?