cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Getting JSON values in text input fields in power apps

I am getting values from api when running test

{
"Timestamp": "2020-11-20T16:13:46.7850036Z",
"Value": "",
"UnitsAbbreviation": "",
"Good": true,
"Questionable": false,
"Substituted": false,
"Annotated": false
}

 

 

i tried using below command

man329_0-1605890812418.png

 

its not returning any values, it just returns one value as "Value".

I am trying to insert each value from api response to the text input. any ideas..

1 REPLY 1
Highlighted
Super User III
Super User III

@man329 

PowerApps does not have the ability to parse a JSON string into a collection/variable.

You can use the Match function on the string to get individual element values like this:

Match(
    yourJSONString, 
    """elementName"": *""(?<value>[^""]+)"
).value

Just replace the yourJSONString with the text you currently have (or record/variable to that text) and the elementName with the name you want to get (ex. Timestamp).

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,679)