How do I access the values stored as JSON in the status and date columns? Please see the example lines below.
status
date
{"1":{"status":true,"date":"2022-03-30"},"3":{"status":true,"date":"2022-03 -30 “}}
Demo:
set @j = '{"1":{"status":true,"date":"2022-03-30"},"3":{"status":true,"date":"2022-03-30"}}'; select json_extract(@j, '$."1".status') as status; +--------+ | status | +--------+ | true | +--------+
In this case, you might accidentally need to put double quotes around "1" to use it in a JSON path.
"1"
Demo:
In this case, you might accidentally need to put double quotes around
"1"
to use it in a JSON path.