The json Array is like this: [{& quot; name & quot;: & quot; a & quot;, & quot; score & quot;: 20, & quot; wrongID & quot;: [1, 2, 6, 7] },{ & quot; name & quot;: & quot; B & quot;, & quot; score & quot;: 50, & quot; wrongID & quot;: [,] },{ & quot; name & quot;: & quot; c & quot;, & quot; score & quot ;: 40, & quot; wrongID mysql
The json Array is like this:
[
{"Name": "a", "score": 20, "wrongID": [1, 2, 6, 7]},
{"Name": "B", "score": 50, "wrongID": [1, 2, 3, 7]},
{"Name": "c", "score": 40, "wrongID": [1, 2, 9, 17]},
{"Name": "d", "score": 70, "wrongID": [1, 2, 16, 27]},
{"Name": "e", "score": 80, "wrongID": [1, 2, 10, 17]},
{"Name": "f", "score": 50, "wrongID": [,]},
]
Table name student, column name is examInfo
For example, how can I obtain the wrongID with the score of 50 in the array ??
I wrote an SQL statement:
Select examInfo-> '$ [*]. wrongID' from student where examInfo-> '$ [*]. score' = 50;
If no data is found, no error is reported. if 50 is changed to '50', the result is the same, with no data.
Does Daniel know how to check it? Ask !!