Using JSON Parser on Array.Object in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:09 AM
Hello,
I recently created an Action in Flow Designer that uses JSON Parser to get some custom field variables on a JSON. This worked great and I was able to get my output variables. However, there were a few more custom fields that I needed to have an output variable for and it's not letting me since its in an Array.Object.
I'm not good at scripting but I created a Script Step to get these fields but its not working.
I've tried making the input variable the payload and going straight to the array.object data pill. When making the input the array.object data pill, it gives me an "Error: u,Detail: Unexpected token: u" when doing the test. When making the input the root payload from the JSON Parser step, it gives me an "Error: o,Detail: Unexpected token: o".
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-24-2021 12:02 PM
That was very helpful and I was able to get the variables, but unfortunately the 'For each' logic is not meshing well with the rest of the items in the subflow for Jira.
Is it possible to get script it in an action instead?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 10:38 AM
@Chris Sanford I have a similar issue, is there any way I can extract the specific key pair from the JSON payload inside of the action?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-24-2022 07:30 AM
hi,
I encountered same error in my flow today. I figured that the JSON object I was trying to parse was already parsed so "stringify"ing the object and then parsing did the trick.
Thanks,
Siva
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2022 08:35 PM
I have faced the same issue. Created Spoke and getting the output but unable to parse the output to the defined variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2022 05:01 AM
Hi Bharath,
Can you post your script here?
Thanks,
Siva