Help wanted - split payload

Hello all experts
I have a payload, which I can not seem to split.
I have tried several things in the last couple of hours, but nothig seems to work.

"{"start_success":true,"session_start":{"customer_id":3,"customers_type":1,"location_id":109,"show_reference":1}}"

This is my payload
Thank you for assisting

Your Payload is either a string of JSON or it is an object.

Where does it come from?

Can you show a screenshot of the debug message containing this payload (expand all sub properties if you can)?

Dear Steve,
this is my full debug message

{"payload":"{"start_success":true,"session_start":{"customer_id":3,"customers_type":1,"location_id":109,"show_reference":1}}","topic":"tool","_msgid":"32807397.5e8d3c","statusCode":200,"responseUrl":"https://api.deater.nu/v1/start?auth_code=50253&token=eyJ0Jpc3MiOiJodHRwczpcL1wvYYXRlci5udVwvdjFcL2xvZ2luIiwiaWF0IjoxNjIxMTk0MzkyLCJleHAiOjE2MjExOTc5OTIsIm5iZiI6MTYyMTE5NDM5MiwianRpIjoiaVFyb3gzTEhhY3BaUG54bCIsInN1YiI6MTA5LCJwcnYiOiI5Zjk0MDc3OT4OTg0ODE1YmRjNmU3ZjFiIn0.ZQEeyv6Ywh8gFwcOsqHWRuoTO0y1TZZX6wCm0bDX4OM","redirectList":[],"_event":"node:1959056d.ccb85b","socketid":"JeKxcaF81n-I_okuAAAG","event":{"clientX":756,"clientY":314,"bbox":[683,335,839,287]},"headers":{"date":"Sun, 16 May 2021 19:47:19 GMT","server":"Apache/2.4.38 (Debian)","cache-control":"no-cache, private","content-length":"112","keep-alive":"timeout=5, max=100","connection":"Keep-Alive","content-type":"application/json","x-node-red-request-node":"357613b8"}}

You didn't answer my questions. No matter. It looks like you are getting this from a http request node & it looks like the payload is an object.

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.

BX00Cy7yHi

https://nodered.org/docs/user-guide/messages

When I remove the first and last " in my payload, I am able to split my payload.
Can you tell me how to remove the first and last " in my payload?

If your Payload is an object, there is no need to split strings. Just grab the path to the property of interest like I explained in previous post.

Show me a SCREENSHOT of the debug message.

So that is a string. To be precise, it is a JSON string.

JSON can be converted to an object then you simply access the property you want.

Your choices are...

  • set the http request to return a parsed object
    Or
  • pass the output of the http request node through a JSON node.

Do one of the above and then follow the instructions I provided in mt first reply.

To be 100% clear, no string splitting is required.

Dear Steve,
Thank you for your help
I hav emanaged to filter it and put it in my touchpanel.
Thanks for pointing out the easy way to copy.

greetings Radjes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.