Hello.
I recive data in Base64 and need decode to utf-8.
I used a converter, but it didn't help...
Does anyone know how to do this?
[
{
"id": "15e0f3e34971d2cc",
"type": "function",
"z": "73a54536c2c8a28a",
"name": "",
"func": "const base64 = '0LPRgNGD0LTQvdGW';\nconst buff = Buffer.from(base64, 'base64');\nconst str = buff.toString('utf-8');\nconsole.log(str);\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 380,
"y": 3560,
"wires": [
[
"80fd16e40118a0a7"
]
]
},
{
"id": "80fd16e40118a0a7",
"type": "debug",
"z": "73a54536c2c8a28a",
"name": "",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 550,
"y": 3560,
"wires": []
},
{
"id": "202e3eed2b1a9439",
"type": "inject",
"z": "73a54536c2c8a28a",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "0LPRgNGD0LTQvdGW",
"payloadType": "str",
"x": 180,
"y": 3560,
"wires": [
[
"15e0f3e34971d2cc"
]
]
}
]