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

Help with extracting string from JSON

Hey everyone,

I've built a QR scanning app which takes the following example JSON from a QR Code and stores it in a text field before sending it off to a Sharepoint list. I need to be able to extract the 'FullName' value and display it on a screen before the record is submitted to Sharepoint.  I can't use Flow to do this due to the app needing to work where mobile reception is very unreliable.

 

{"Email":"me@test.dk","FullName":"Me H. Mine","IsShareholder":true,"FieldRep":"Joe Bloggs","SupplierNumber":"S003535","GenericExtensions":[{"Key":"Loyalty","Value":"Gold"},{"Key":"AttendanceLevel","Value":"High"},{"Key":"NewsLetterSubscriber","Value":"Yes"}],"LastUpdatedOn":"2020-04-14T16:22:10"}

 

Ideally, I'd have liked to be able to just parse the JSON, but scanning it in via QR into a variable seemingly means I can't just call the object - if I take the above and Set it into a variable (qrtstring) then I can do the following

 

Concatenate("Welcome " , qrstring.FullName)

 

So I'd like to know how to use a combination of the First/First/Match functions etc to find the 'FullName' object and return the name (Me H. Mine)?

TIA

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Resolver III
Resolver III

Re: Help with extracting string from JSON

hi there seeing its going to a control already why not use something like (label3 my control)

Mid(Label3.Text,Find("FullName",Label3.Text)+Len("FullName"":"""),(Find(""",""IsShareholder",Label3.Text)-Find("FullName",Label3.Text)-11))

View solution in original post

2 REPLIES 2
Highlighted
Resolver III
Resolver III

Re: Help with extracting string from JSON

hi there seeing its going to a control already why not use something like (label3 my control)

Mid(Label3.Text,Find("FullName",Label3.Text)+Len("FullName"":"""),(Find(""",""IsShareholder",Label3.Text)-Find("FullName",Label3.Text)-11))

View solution in original post

Highlighted
Frequent Visitor

Re: Help with extracting string from JSON

Brilliant, thanks Rubin - works perfectly!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (6,561)