I am having a JSON array of numbers like [16, 9, 11, 22, 23, 12]. I would like to get the index of numbers within the array. For example is I say that I would like to have the index of 9, it should return 1.
I tried using below mentioned query in MySQL, but getting null.
SELECT JSON_SEARCH(CAST('[16, 9, 11, 22, 23, 12]' AS JSON),'one',9)
Do you guys have solution for this ?