Created
October 19, 2016 12:42
-
-
Save lerouxb/a565053b3003e46d3f10b90052fc7715 to your computer and use it in GitHub Desktop.
Unique Airbnb types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var json = JSON.parse(document.getElementById('_bootstrap-neighborhood_card').attributes.content.value); | |
var unique = Object.keys(json.place_recommendations.reduce(function(memo, place) { memo[place.type] = true; return memo;}, {})); | |
unique.sort(); | |
console.log(unique.join('\n')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bar | |
cafe | |
groceries | |
other | |
restaurant | |
store | |
tourism |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment