How to get boolean outputs and use them in JSON payload
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2020 11:01 AM
-Using IntegrationHub and Flow designer.
Hi,
I have to get a value "true" as boolean output from the script step and pass it as a boolean in the JSON payload builder step.
I am facing the below issues.
1) How to get an output as Boolean from script step.
2) Anything that I pass without quotes, gets passed in quotes in the JSON payload step.
Any suggestions would be appreciated.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2020 04:29 PM
Hi Sukrit,
I tested this and it seems you are right, if you pass a True/False data-dot into the payload builder, it creates it as a string. That's not great 😞
I have a few other options, as below:
Your best bet is to create the payload you want as a new JS object in a script step, then set a string output with JSON.stringify(obj) - this will not only fix the issue, but let you add child objects to your payload!
Here's the output of the string:
That seems more like what you are after!
Thanks,
Andrew