title: push value to json array undefined
body: <p>Made a new json object called new_week and initialized a new array inside. It prints fine right after initializing it but inside the callback function, it says it is undefined and throws an error when I try to push something (because it's undefined). Why is this? </p>
  
  <pre><code>    for(var i = 0; i &lt; week_arr.length; i++){
          var new_week = {};
          new_week[week_arr[i]] = []
          console.log(new_week[week_arr[i]]); //prints []
  
          for(var j = 1; j &lt; part_arr.length; j++){
              client.hgetall("xyz", function(err,object){
                  console.log(new_week[week_arr[i]]); //prints undefined?
                  new_week[week_arr[i]].push(something);   
              }
          }
  
  }
  </code></pre>