Web Services get entitlements from loop

I am hoping someone can point me in the right direction on mapping entitlements to a user when those entitlements come from a separate api call in the web services connector.
We have the below
an api call “…v1/users” that give us information about the user including the userid
an api call “…v1/usergroups” that give us information about the groups including the groupid
The only way to get the members of the group is to go through each group with api call “/v1/usergroups/$response.groupid$/users” (pointing back to “…v1/usergroups” as the parent) . That gives us the userid of each user in that group.
I cant get that to link back to the users record as an entitlement. I have tried several different ways to configure the Response mappings. Any direction in what I am missing would be appreciated.

Fernando has put together some pretty nice blogs for creating loopback connectors and this one specifically does some chaining, perhaps this will get you what you need: