Last active
November 1, 2018 22:32
-
-
Save ryanpcmcquen/df098ea65d727bb2ccab9251e8bdc48f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
fetch('https://api.surlatable.com/stores/') | |
.then((response) => response.json()) | |
.then((data) => | |
console.log( | |
JSON.parse(data.body) | |
.Items.reduce((culinaryList = [], store) => { | |
if ( | |
Object.keys(store.culinary).length && | |
store.culinary.cookingClasses.toLowerCase() !== 'no' | |
) { | |
culinaryList.push(String(store.id).padStart(3, '0')) | |
} | |
return culinaryList | |
}, []) | |
.sort() | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment