Din syntaks inde i json_extract()
var lidt væk. Prøv at bruge dette i stedet:
SET @mapJSON = '[{"from":12,"to":0},{"from":11,"to":-1},{"from":1,"to":1}]' ;
SELECT JSON_EXTRACT(@mapJSON, "$.from") AS `from`,
JSON_EXTRACT(@mapJSON, "$.to") AS `to`
Dette skulle give dig et resultatsæt, der ser sådan ud:
from to
[12, 11, 1] [0, -1, 1]