{"xyz":{"aaabc":"80.00","ccccd":null,"npccc":"0.00","txnid":"pca","diccsc":"0.00"}}
I have to extract xyz where xyz is dynamic variable ( in some case it maybe xyz in other it may be abc or anything )
Assuming your data is a varchar
, you can
json
map(varchar, json)
map_entries
SELECT map_entries(CAST(CAST(my_column AS json) AS map(varchar, json))[1]
FROM ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.