Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//returns array of users
function getUser(){
return fetch('user.json');
}
function getAccountsForUser(user){
return fetch(`users/${user.id}/accounts`);
}
function getPropertiesForAccount(account){
return fetch(`accounts/${account.id}/properties`);
}
function getProfilesForProperty(property){
return fetch(`props/${property.id}/profiles`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment