"fClassName":"NotifyAction",
"fActions":[ {
"type":"ConferenceAction",
"properties": {
"fClassName":"ConferenceAction",
"fName":**"CC0002308"**,
"fRecord":false,
"fMuted":false,
"fStartOnEnter":true,
"fEndOnExit":false,
"fHangupOnStar":true,
"fExtraOptions": {
"beepOnExit":true, "beepOnEnter":true, "enableImmediateInput":false
}
}
}
]
}
get_json_object
函数从json字符串中提取值!
Example:
select get_json_object(str,'$.fActions[0].properties.fName')fname
from ( //sample data
select string('{"fClassName":"NotifyAction","fActions":[{"type":"ConferenceAction","properties":{"fClassName":"ConferenceAction","fName":"CC0002308","fRecord":false,"fMuted":false,"fStartOnEnter":true,"fEndOnExit":false,"fHangupOnStar":true,"fExtraOptions":{"beepOnExit":true,"beepOnEnter":true,"enableImmediateInput":false}}}]}') as str
)e;
Output:
+---------+
| fname|
+---------+
|CC0002308|
+---------+