First of all, I am not sure if my title explains this question in the correct way but I think my code will.
Instead of doing this:
SELECT * FROM mytable WHERE JSON_EXTRACT(`cars`,'$."65"') = 'Toyota' OR JSON_EXTRACT(`cars `,'$."66"') = 'Toyota' OR JSON_EXTRACT(`cars `,'$."67"') = 'Toyota'
I want to do this:
SELECT * FROM mytable WHERE JSON_EXTRACT(`cars`,any of these 65,66,67) = 'Toyota'
Can this be done?
JSON_EXTRACT(json_doc, path[, path] ...)source dev.mysql.com/doc/refman/8.0/en/… .. Looks like it's possible to include multiple paths..