简体   繁体   中英

How to get VALUE by KEY in Json?

Given:

 [{"{#NAME}":"BULL","{#VALUE}":"98.03"},{"{#NAME}":"BILL","{#VALUE}":"98.32"}]

How get VALUE by NAME?

My code didn't working:(

$['{#NAME}']['VALUE']

Assuming you are using the JSONPath preprocessing, the correct filter is $['{#NAME}'] .

You can use https://jsonpath.com/ to do your tests since Zabbix doesn't have a similar feature (yet).

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM