cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
TopShelf-MSFT Community Champion
Community Champion

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

Bumping for visibility 

 

@TopShelf-MSFT 

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

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