Created on 09-27-2021 07:36 PM - edited 09-27-2021 07:38 PM
从MQTT接收到的数据,要读入json数组
EvaluateJsonPath 如何获取JSON数组
我正在使用 EvaluateJsonPath 并且无法读取传感器数据
Created 09-27-2021 08:02 PM
I think the problem is that you are trying to evaluate path on a list of sensors:
sensor":[{"sensor_id":"Data05_37_alarm","value ":"0"},{"sensor_id":"Data06_37_alarm","value":"0"}....
you probably need to flatten json first and if you are trying to get each sensor information then you need to do splitjson and then you can do evaluatejsonpath. Hope that helps.
Created 09-27-2021 08:02 PM
I think the problem is that you are trying to evaluate path on a list of sensors:
sensor":[{"sensor_id":"Data05_37_alarm","value ":"0"},{"sensor_id":"Data06_37_alarm","value":"0"}....
you probably need to flatten json first and if you are trying to get each sensor information then you need to do splitjson and then you can do evaluatejsonpath. Hope that helps.
Created 09-27-2021 08:23 PM
First of all, thank you for your reply. I will try your method