mosquito_sub to jq get value

I have MQTT mosquitto_sub running on linux bash that outputs this JSON data received from power plug: #mosquitto_sub -t stat/sensors/# | jq -r ‘.’ { “Status”: { “Module”: 52, “FriendlyName”: [ “stecker2” ], “Topic”: “sensors”, “ButtonTopic”: “0”, “Power”: 0, “PowerOnState”: 3, “LedState”: 1, “SaveData”: 1, “SaveState”: 1, “SwitchTopic”: “0”, “SwitchMode”: [ 0, 0, 0, 0,…

Details

Accessing Text Keyword Field through a Script

I am trying to do some scripting in elasticsearch Here is an example of the JSON segment in the request. { “script_score”: { “script”: { “source”: “doc.containsKey(‘var’)?params.adder[doc[‘var’].keyword]:0 “, “params”: { “adder”: { “type1”: 1, “type2”: 1000 } } } }, “weight”: 100000 } This is the error that is thrown { “shard”: 0, “index”: “”,…

Details