I want to be able to make the console.log(key); make the log every 5 seconds, at the moment there is no delay and all the data gets logged at the same time.
//the location of my usres table
var ref = new Firebase('https://myapp.firebaseIO.com/users/');
//ask fire base to get the records just once
ref.once("value", function (snapshot) {
//loop through the retuned records
snapshot.forEach(function (childSnapshot) {
// get just the value for the key
var key = childSnapshot.key();
// log the key - this will be changed to send the value to another function
console.log(key);
});
})
The console.log above give me thousands of Id's, I need to pass these Id's to another function, If I pass all these id's all at one time the next function will blow up, so I want to pass them slowly, one by one to the next function. other ideas welcomed.