cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martinfy
Regular Visitor

Custom connector and interpretation of JSON without complete key/value structure from API

I have created a custom connector which connects to an endpoint that returns JSON in the following format:

{ 
  "sammy" : {
    "username"  : "sammy",
    "location"  : "Indian Ocean",
    "online"    : true,
    "followers" : 987
  },
  "jesse" : {
    "username"  : "jesse",
    "location"  : "Pacific Ocean",
    "online"    : false,
    "followers" : 432
  },
  "drew" : {
    "username"  : "drew",
    "location"  : "Atlantic Ocean",
    "online"    : false,
    "followers" : 321
  },
  "jamie" : {
    "username"  : "jamie",
    "location"  : "Pacific Ocean",
    "online"    : true,
    "followers" : 654
  }
}

The problem, when I try to use the data in PowerApps, i.e. in a gallery, the first level of the JSON structure isn't on a key value format (i.e. "sammy" and "jessy" insted of "name":"sammy" and "name":"jessy"). These are interpreted as keys and have to be accessed in a non dynamic fashion with getUsers()."sammy", getUsers()."jessy" and so forth where getUsers() is the function name in the custom connector.

 

Is it possible to configure the custom connector, so these values aren't interpreted as keys but values? Or to completely skip the first level (since the information also is available in the next level of the JSON structure)?

1 REPLY 1
Anonymous
Not applicable

Bumping for visibility 

 

@Anonymous 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,153)