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.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,965)