Hello, thank you for receiving my query. I have a signal hub that receives measurements from many sensors (temperature, humidity, signal and battery), this hub sends the data to the Broker's MQTT queue (all data is in a single JSON). I try to filter each sensor by mac but I don't know the language... as an example I get messy information using: $[1].temperature, $[1].humidity, $[1].rssi and $[1].battery ( but the sensor that displays it is unknown). The JSON in question is as follows: (I want to obtain the values of the 4 measurements for the sensors "AC233FA2110B" and "AC233FA2111A"...)
[{"timestamp":"2022-10-14T13:21:19Z","type":"S1","mac":"AC233FA2110B","bleName":"","rssi":-66,"battery ":100,"temperature":-6.63,"humidity":75.17},{"timestamp":"2022-10-14T13:21:20Z","type":"S1","mac":"AC233FA2111A" ,"bleName":"","rssi":-78,"battery":100,"temperature":8.08,"humidity":59.96},{"timestamp":"2022-10-14T13:21:22Z" ,"type":"S1","mac":"AC233FA2111A","bleName":"","rssi":-81,"battery":100,"temperature":8.08,"humidity":59.96}, {"timestamp":"2022-10-14T13:21:22Z","type":"S1","mac":"AC233FA2110B","bleName":"","rssi":-65,"battery" :100,"temperature":-6.63,"humidity":75.17},{"timestamp":"2022-10-14T13:21:23Z","type":"S1","mac":"AC233FA2111A", "bleName":"","rssi":-79,"battery":100,"temperature":8.04,"humidity":60.41}]
I have not been able to filter by devices independently. I hope you can help me, I am grateful.
Add comment