Her er en løsning i MySQL 5.7-syntaks:
select be.config->'$.encounterId' AS eid
, be.config->'$.providerId' AS gender
, be.config->'$.patientId' AS pid
, be.config->'$.formId' AS formid
from bencounter be \G
Output:
*************************** 1. row ***************************
eid: "f45bf821-98e1-4496-82ef-047971e168cb"
gender: "38001853-d2e1-4361-9fff-cfca1aedf406"
pid: "f4d04edb-652f-427c-ac25-6fecbda2a0aa"
formid: "ETAT"
Husk at feltnøgler i JSON er store og små. For eksempel 'formId'
er ikke det samme som 'formid'
.