Using JSON Parser on Array.Object in Flow Designer

TramaineM
Kilo Sage

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". 

 

19 REPLIES 19

Michael Fry1
Kilo Patron

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.

Ah thanks. Not sure how I missed that.

I updated it but unfortunately it's the same errors. 

find_real_file.png

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.

I didn't because I can see it in the runtime values. That makes sense to try the allInputs.startdate etc. I changed them all but still getting that weird error.

find_real_file.png