Hello. i receive data from a http link. i just want to extract or separate data to extract value.
actually i have that.
how can i do please ?
Hello. i receive data from a http link. i just want to extract or separate data to extract value.
actually i have that.
If I'm not mistaken you are shelling python to call the HTTP endpoint then using CSV node to split json data.
Replace the python node with a HTTP request node set to parse JSON data in the return value.
Then to access any piece of data within the return value....
There’s a great page in the docs that will explain how to use the debug panel to find the right path to any data item.
Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.
@Steve-Mcl
Hello. thanks for reply.i can't do this like that because i need this python function to call a new link each time. i do it with csv (maybe 2 csv) but i don't remember how
Of course you can. Nothing stopping you generating the URL in node-red.
Sorry but i don(t understand how to do itbut maybe i don't explain it correctly..i want all the value but without the comma..
just to explain python is creating a secure link each call.
I understand, but you are missing the point. You data looks like JSON therefore you are processing it incorrectly.
As I alluded to in my earlier response, it looks like you are getting JSON data NOT CSV data.
Try replacing the CSV node for JSON node. Then you can access values directly from the object properties as I explained in my first response.
If that doesn't work, attach a debug node directly to the output of the python node. Show us what comes out of it.
Some info:
This post should help to clarify JavasScript objects and JSON.
Ps, my earlier point was that I am almost certain whatever it is you are doing in python could be done in nodered natively i.e. there is very likely no need to shell out to python (it could all do be done in the node-red graphical environment) but that is up to you.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.