I'm new to JSON and struggling. I have a dashboard form that collects an integer and stores it in JSON. I need to extract the integer so I can use it. I'm failing miserably.
Please help
Here's my flow
[
{
"id": "24bd94a6ca28cffd",
"type": "ui_text",
"z": "cb58b0f2ac83d096",
"group": "3d153cb1a380b89c",
"order": 6,
"width": 0,
"height": 0,
"name": "",
"label": "Brightness Level",
"format": "{{msg.payload}}",
"layout": "row-spread",
"className": "",
"x": 910,
"y": 300,
"wires": []
},
{
"id": "1adcbd7787bbc99e",
"type": "ui_form",
"z": "cb58b0f2ac83d096",
"name": "",
"label": "deskBrightness",
"group": "3d153cb1a380b89c",
"order": 5,
"width": 0,
"height": 0,
"options": [
{
"label": "deskBrightness",
"value": "deskBrightness",
"type": "number",
"required": true,
"rows": null
}
],
"formValue": {
"deskBrightness": ""
},
"payload": "",
"submit": "submit",
"cancel": "",
"topic": "payload",
"topicType": "msg",
"splitLayout": "",
"className": "",
"x": 640,
"y": 160,
"wires": [
[
"24bd94a6ca28cffd",
"4efa61ae4de6cc01",
"77d66229b27cca54",
"13aa0c22eb6bcabb",
"3ab83c4d2a526220"
]
]
},
{
"id": "a1daf67020415503",
"type": "inject",
"z": "cb58b0f2ac83d096",
"name": "",
"props": [
{
"p": "payload"
}
],
"repeat": "3",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "8",
"payloadType": "num",
"x": 450,
"y": 160,
"wires": [
[
"1adcbd7787bbc99e"
]
]
},
{
"id": "3ab83c4d2a526220",
"type": "debug",
"z": "cb58b0f2ac83d096",
"name": "debug 165",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "true",
"targetType": "full",
"statusVal": "",
"statusType": "auto",
"x": 1170,
"y": 140,
"wires": []
},
{
"id": "4efa61ae4de6cc01",
"type": "json",
"z": "cb58b0f2ac83d096",
"name": "JS Object",
"property": "payload",
"action": "obj",
"pretty": false,
"x": 880,
"y": 220,
"wires": [
[
"3ab83c4d2a526220"
]
]
},
{
"id": "77d66229b27cca54",
"type": "json",
"z": "cb58b0f2ac83d096",
"name": "string & Object",
"property": "payload",
"action": "",
"pretty": true,
"x": 900,
"y": 60,
"wires": [
[
"3ab83c4d2a526220"
]
]
},
{
"id": "13aa0c22eb6bcabb",
"type": "json",
"z": "cb58b0f2ac83d096",
"name": "JSON String",
"property": "payload",
"action": "str",
"pretty": true,
"x": 910,
"y": 120,
"wires": [
[
"3ab83c4d2a526220"
]
]
},
{
"id": "3d153cb1a380b89c",
"type": "ui_group",
"name": "LED Switch",
"tab": "c548a45fe690539c",
"order": 1,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "c548a45fe690539c",
"type": "ui_tab",
"name": "Home",
"icon": "dashboard",
"order": 1,
"disabled": false,
"hidden": true
}
]