Error make Expression JSON Object

Hi,

I am having problems generating the Expression to send in the header on the http request node method post json / raw active my attempts

Expression:
{{JSON.parse (JSON.stringify (’{“Cookie”: “JSESSIONID =’ + $ json [” jsessionid “] + '”}’))}}

Result with node return:
{“Cookie”: “JSESSIONID = kH8siXLILnO2jUkI-aKIk-8IB7O_LEIEfDRFUOeU”}

Error presented, and I’m doing the parse:

Below I work inserting manual in place of … but I need to send the value received from a node …

Expression:
{{JSON.parse (’{“Cookie”: “JSESSIONID = …”}’)}}

{{JSON.parse (’{“Cookie”: “JSESSIONID = kH8siXLILnO2jUkI-aKIk-8IB7O_LEIEfDRFUOeU”}’)}}

Result that works:
[Object: {“Cookie”: “JSESSIONID = …”}]

[Object: {“Cookie”: “JSESSIONID = kH8siXLILnO2jUkI-aKIk-8IB7O_LEIEfDRFUOeU”}]

But I need receive … from another node.

You should be able to set the expression:

{{ {"Cookie":$json.jsessionid} }}

Here an example workflow:

1 Like