Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
admin.database().ref("/sites")
.orderByChild('user_count')
.startAt(3)
.limitToLast(20)
.once('value')
.then((snapshot) => {
let sites = snapshots.val()
if (sites == null) { return }
for (let site_key in sites) {
let site = sites[site_key]
...
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment