Skip to content

Instantly share code, notes, and snippets.

@choonkending
Last active June 6, 2017 11:43
Show Gist options
  • Save choonkending/e9eff0b251c1b7a69c1e039409e39fca to your computer and use it in GitHub Desktop.
Save choonkending/e9eff0b251c1b7a69c1e039409e39fca to your computer and use it in GitHub Desktop.
const getBedrooms = data => {
const bedrooms = data.listing && data.listing.features && data.listing.features.bedrooms;
if (bedrooms) {
return bedrooms.value;
}
return 0;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment