Question

Parsing JSON response without a property name (only value)

  • 8 September 2021
  • 1 reply
  • 56 views

Hi, I was hoping someone could assist with parsing a response from a code snippet as part of a custom integration.

As part of my request, I receive a JSON response that is value only (no property name).

Example:

{“WQiOiJwaW9uZWVyLmN5bGFuY2UuY29tIn0.UhxkNikE7_4Z__GaZ9Xmrb6JZ_OnZQKC0ruTxV64qK0SE2I9hS0G18wkqaxJ3IS46m0Vv6fK_8-Nm1vj0Ij6datE6lJpsedd8_nNOfsU_OCkwf8TXdgiwRZ3B3cllFcPseQ7ot00rvljNC0KaG-1P7QWSNiQL_by9-prpXS28-ZGamgl8SkbnQF1BflxIvr57HBC9ZYI20cLKVkmBodgQMU5GJPknnhwmt4Ul7JM2u1e24rsW8Htvnx-YBQ17WmQ2kip9V3MLx9dhFPkAG40FDSW_ux5xGh3VhdWa_zJQjKhD_-wGMCrpYlWpqFap5T_-Wvi-YtIdgvWYK_gwvwV7Q”}

 

I am trying to parse it so I can return as:

{ “access_token” : “WQiOiJwaW9uZWVyLmN5bGFuY2UuY29tIn0.UhxkNikE7_4Z__GaZ9Xmrb6JZ_OnZQKC0ruTxV64qK0SE2I9hS0G18wkqaxJ3IS46m0Vv6fK_8-Nm1vj0Ij6datE6lJpsedd8_nNOfsU_OCkwf8TXdgiwRZ3B3cllFcPseQ7ot00rvljNC0KaG-1P7QWSNiQL_by9-prpXS28-ZGamgl8SkbnQF1BflxIvr57HBC9ZYI20cLKVkmBodgQMU5GJPknnhwmt4Ul7JM2u1e24rsW8Htvnx-YBQ17WmQ2kip9V3MLx9dhFPkAG40FDSW_ux5xGh3VhdWa_zJQjKhD_-wGMCrpYlWpqFap5T_-Wvi-YtIdgvWYK_gwvwV7Q”}


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @maxs 

Try Formatter > Text > Replace

Replace {“ with {“access_token”:”