Why is the new Monsters object only being filled while being called inside the mysql function scope?
    Monsters = {};
db.query('SELECT * from rpg_monsters ', function(err, results) {
        for(i=0; i < results.length; i++){
        Monsters[results[i].monster_id] = {
                monster_id: results[i].monster_id,
                monster_name: results[i].monster_name,
                monster_filename: results[i].monster_filename,
                monster_hp: results[i].monster_hp,
                monster_chp: results[i].monster_hp,
                monster_type: results[i].monster_type,
                monster_level: results[i].monster_level,
                xPosition: results[i].monster_xPosition,
                yPosition: results[i].monster_yPosition
            }
        }
 console.log(Monsters); // This Returns True with all the objects properties!
db.end();
});
console.log(Monsters); // This Returns Empty?
Is it possible use the Monsters object (or any) outside of the mysql callback?
 
     
    