cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vmatkus
Frequent Visitor

Get single values to PowerApp from API JSON array

Hello,

tried to search for info but no help and i am very new with all this.. 😞

 

I get from api json array and need to send two variables to power apps 🙂

 

My json array will always have single set of values because api is with query for single value, but this api can return many values without query.

 

My question is how to send to power apps two variables. I tried Compose, Select and etc, but nothing works... I need to get these highlited values, it is my parse json output:

vmatkus_0-1635317768295.png

vmatkus_1-1635317824737.png

 

Thank You

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @vmatkus,

 

Your response is an array. You could use an index [0] to retrieve the first item of the response. After the index you can specify the field.

 

Below is an example expression for the fuel field of the first item:

outputs('parse_json')['body']['response'][0]['fuel']

View solution in original post

2 REPLIES 2
Expiscornovus
Super User
Super User

Hi @vmatkus,

 

Your response is an array. You could use an index [0] to retrieve the first item of the response. After the index you can specify the field.

 

Below is an example expression for the fuel field of the first item:

outputs('parse_json')['body']['response'][0]['fuel']

View solution in original post

vmatkus
Frequent Visitor

Thank You!! Very big Thank You! 🙂 It works immediately... 🙂 I found something similar and tried, but was not sure how this syntax works and did not found myself in two days... 🙂

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (3,165)