cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ld
Regular Visitor

Get Array from Json

Hi, I have a json file in onedrive and I wish to get an array of values from it. The json file has an array of objects contained in it.

 

 [
  { "First": "" 
      "Last": ""
       "Address" : "" 
  },
  { "First": "" 
      "Last": ""
       "Address" : "" 
}
] 

 

 

 

Steps

  • get the file from onedrive using "Get file content using path"
  • convert the base64 to a json object
  • Parse JSON
  • Initialize variable
  • Apply to each & Append to variable array

 

at this point I get the error

"ActionFailed. An action failed. No dependent actions succeeded." Anyway this seems like a lot of work to just get a bunch of values which could easily be done if I were using something like jsonPath.

 

Maybe my approach is incorrect. Any help here would be appreciated. Tks

8 REPLIES 8
v-yamao-msft
Community Support
Community Support

Hi @ld,

 

Please check the following blogs for a reference:

USING JSON IN MICROSOFT FLOW

https://sergeluca.wordpress.com/2017/11/23/using-json-in-microsoft-flow-part-1/

A Thesis on the Parse JSON action in Microsoft Flow

http://johnliu.net/blog/2018/6/a-thesis-on-the-parse-json-action-in-microsoft-flow

 

Best regards,

Mabel

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

thanks @v-yamao-msft I've looked at both of those and cannot see anything thats going to help. 

Do advanced examples of flows exist using expressions and json. May someone could point be to those? 

 

 

jho
New Member

@ld i have the same questions, did you get any solution for this?

@jho This seems to work: 

 

split(replace(replace(string(body('YOUR ACTION NAME')),'{',''),'}',''),',')

 

from this post

apc_and_rod
Frequent Visitor

Hi ID,

 

Could you please help opening the json file from sharepoint / onedrive and convert the base 64 to a json object, Parse JSON... please

apc_and_rod
Frequent Visitor

Can anyone, please help me to open a json file from sharepoint, convert the base 64 to json object, so I can parse JSON and then use the json data in my flow..

Please, help me !!!

Murderbot
Advocate IV
Advocate IV

@apc_and_rod, perhaps this thread would be helpful to you.

 

Do you have a flow already created that is erroring out?  You'll need to be a bit more specific as to what trouble you're having in the process.

All good now, the problem was null values in some fields, replaced them for "".

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,795)