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-19-2021 08:38 AM
I'm not sure if this is the issue but your lines 2 & 3, the outputs aren't correct. ie outputs.plannedstart but the output is startdate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:53 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 11:32 AM
Did you try adding a log statement to confirm your input contains what you thought it contains?
Looking at line 2 - allInputs.issue.fields.customfield_10010.startDate, why do you need 'issue.fields' when that's in your input. Thinking it should be allInputs.startdate.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 11:58 AM