【发布时间】:2021-01-29 10:08:12
【问题描述】:
这个 json_extract 有效,但很乱,我想清理它,但我不知道如何。
json_unquote(json_extract(
json_unquote(json_extract(
json_unquote(json_extract(
json_unquote(json_extract(
json_unquote(json_extract(
json_unquote(json_extract(response, '$.output')), '$.output')), '$.risk_score_model_result')), '$.value')), '$.ModelInputs')), '$.fieldname')) as fieldname;
我尝试使用-> 和->>,但我只能让它工作一层深。例如,response -> '$.output' 有效,但是
response ->> '$.output' ->> '$.output' 或 -> 和 ->> 的任何变体都会引发语法错误。
对于 MySQL 和 json 提取,我是一个新手(显然),所以提前感谢您的帮助。
【问题讨论】: