Problem Description:
At that time, I wrote a mysql function, mainly to process the json object array data, and then first loop the json array, and then found
jsonarray->>'$[i].educationalLevel'
that the syntax was wrong, which should not be abnormal normally.
The error message is as follows:
Solution process:
I guess it is i
caused by variables, so I jsonarray->>'$[i].educationalLevel'
changed it to the following:
JSON_UNQUOTE(JSON_EXTRACT(jsonarray,CONCAT('$[',i,'].technicalTitles')));
->>
It is equivalent to JSON_UNQUOTE(JSON_EXTRACT());
the difference between these two, the point is that this variable i
may not be recognized as a number, so here is used to write CONCAT
the variable i
separately, so it is ok.