Hello everyone, how to get all context key and data value. in one variable array object?
since
> context.keys()
only returns all context keys, I want the data value too.
Hello everyone, how to get all context key and data value. in one variable array object?
since
> context.keys()
only returns all context keys, I want the data value too.
Sorry everyone i have found the solution..
[
{
"id": "b76b82eb9f1905bf",
"type": "inject",
"z": "107aae492a2a8ba7",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 360,
"y": 1520,
"wires": [
[
"9af809098a246a3b"
]
]
},
{
"id": "9af809098a246a3b",
"type": "function",
"z": "107aae492a2a8ba7",
"name": "",
"func": "context.set(\"A\",[{\"A\":1,\"B\":2}])\ncontext.set(\"B\",[{\"A\":1,\"B\":2}])\ncontext.set(\"C\",[{\"A\":1,\"B\":2}])\ncontext.set(\"D\",[{\"A\":1,\"B\":2}])\n\nvar data = context.keys()\n\nmsg.payload = context.get(data)\n\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 580,
"y": 1520,
"wires": [
[
"58292cc55f49a2bd"
]
]
},
{
"id": "58292cc55f49a2bd",
"type": "debug",
"z": "107aae492a2a8ba7",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 850,
"y": 1520,
"wires": []
}
]
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.