cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shegs
Advocate II
Advocate II

JSON Objects to Array

I have a JSON response from an API call that returns a userset like below:

2018-09-27_11-28-12.jpg

I'd like to convert that somehow into an array of users that I can then loop through.

I've tried just replacing the second layer of {} to [] but the ID and the ":" cause issues. I don't quite know how to replace those since they can be various numbers and there could be hundreds of them. I was looking for some kind of regex or wildcard replace but the only one I found required another subscription plan that I'd prefer to avoid.

 

Thanks in advance.

-Aaron

1 ACCEPTED SOLUTION

Accepted Solutions

I was able to create an SQL stored procedure that fixed the JSON to what I wanted.

I used flow to send the JSON to SQL as a string then took the response and could edit it down to what I need it to be.

View solution in original post

2 REPLIES 2
Shegs
Advocate II
Advocate II

for example I would need it to look like this:

2018-09-27_13-14-58.jpg

I was able to create an SQL stored procedure that fixed the JSON to what I wanted.

I used flow to send the JSON to SQL as a string then took the response and could edit it down to what I need it to be.

View solution in original post

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 (1,266)