Hi,
Bit of a NR newbie...I simply want to use the jq engine but it returns nothing. I've setup the contrib-json node using the example in the node description. My simple flow uses an inject not to pass JSON in msg.payload. If I run the jq command in a shell, it works perfectly. Nothing logged even if log level is set to trace. My flow is as follows:
[
{
"id": "e8fb13e0.4b16f",
"type": "tab",
"label": "Flow 2",
"disabled": false,
"info": ""
},
{
"id": "ebe1cdf6.44d1a",
"type": "debug",
"z": "e8fb13e0.4b16f",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"x": 880,
"y": 440,
"wires": []
},
{
"id": "ab8a8d71.2802b",
"type": "contrib-json",
"z": "e8fb13e0.4b16f",
"engine": "jq",
"command": "/usr/bin/jq",
"expr": ".foo[-1:] | {last: .[]}",
"complete": "property",
"prop": "payload",
"name": "Run JQ",
"x": 660,
"y": 380,
"wires": [
[
"ebe1cdf6.44d1a"
]
]
},
{
"id": "613cc843.4e14e8",
"type": "inject",
"z": "e8fb13e0.4b16f",
"name": "",
"topic": "",
"payload": "{\"foo\":[\"a\",\"b\",\"c\"]}",
"payloadType": "json",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"x": 450,
"y": 340,
"wires": [
[
"ab8a8d71.2802b"
]
]
}
]
Any ideas?
Thanks.