What is the syntax to compare an entire MySql json column with a json object?
The following doesn't work:
select count(criteria) from my_alerts where criteria = '{"industries": ["1"], "locations": ["1", "2"]}'
I get a count of 0 even when the criteria column has value {"industries": ["1"], "locations": ["1", "2"]}
correct me if I'm wrong but two JSON objects are equal if they have the same set of keys, and each key has the same value in both objects. The order of the keys and values is ignored. So the following should be the same?
{"industries": ["1"], "locations": ["1", "2"]} = {"locations": ["2", "1"], "industries": ["1"]}
* Update *
I've managed to get it w