I have following records in mysql(5.7) table in which data has json data type.
id data
1 [{"key": 1,"value": "rom"},{"key": 54,"x": 1}]
2 [{"key": 1,"value": "sun"},{"key": 54,"x": 0.5}]
3 [{"key": 54,"x": 1.2},{"key": 1,"value": "test"}]
4 [{"key": 1,"value": "japan"},{"key": 54,"x": 2}]
5 [{"key": 1,"value": "east"},{"key": 52,"x": 1}]
I want to make where condition on data column. if key = 54 and x >= 1 then it should retrun id => 1,3,4
if key = 54 and x < 1 then it should retrun id => 2