Node red convert string to fields

Hello i want a way to convert my string data into Json fields where they can be read by things speak

maybe the json node :wink:

when i do that i get this error

before the split ?

same things

so what is going into the split ? What is the split actually splitting up ? is that a string ? can you just paste that string ?

before splitting is this ,the decrypt payload is just to decrypt the binary array

But no matter - a function after the split like this - should do it (instead of the json node)

var m = msg.payload.split(':');
msg.payload = {};
msg.payload[m[0]] = m[1];
return msg;

thank you i appreciate it now i have like that but i cant get any entries in the thingspeak using thingspeak42

No idea - never used that node - - looks like it is actually asking for topics with values not an object ... so I'd guess maybe this instead...

var m = msg.payload.split(':');
msg.topic = m[0];
msg.payload = m[1];
return msg;

but I've never used it - so you'll have to read their docs.

thank you very much

now at least has data queuing but am getting this error

Lookup http error 400. I think it means not allowed (is bad credentials)

400 (Bad request) The server didn't understand the syntax of the request.

1 Like

i put all credential right i looked it up there is no solution