text: Q:
  
  add to array the result that came from $.each
  
  I'm trying to tweak highchart to cater my needs. I want to make an array like (refer below)
  categories: ['2015-04-07', '2015-08-07', '2015-12-07', '2015-16-07', '2015-20-07', '2015-24-07', 2015-28-07', '2015-22-07', '2015-26-07', '2015-30-07', '2015-34-07', '2015-38-07']
  
  and I have json stuff that parse the retrieved data eqaul to each data from above.
  $.each(JSON.parse(response.var), function(index, value){                          
   //value.creation_date.replace('00:00:00', '').trim(); 
  });
  
  For each value.creation_date, the content is like (2015-05-14 00:00:00) so I have to use
  replace('00:00:00', '').trim(); 
  
  so that the result will be "2015-05-14". How to put each
  value.creation_date.replace('00:00:00', '').trim() 
  
  like an array to make it look like this
  categories: ['2015-04-07', '2015-08-07', '2015-12-07', '2015-16-07', '2015-20-07', '2015-24-07', 2015-28-07', '2015-22-07', '2015-26-07', '2015-30-07', '2015-34-07', '2015-38-07']
  
  i tried declaring a global var like
  var num = "";
  
  and then inside the $.each
  num = + "," + value.creation_date.replace('00:00:00', '').trim();
  
  and tried to display it to see if it works
  $("body").html(num);
  
  but sadly not working. Any ideas, clues, recommendation, suggestion?
  
  A:
  
  below code should get you an array:
  var num = [];    
  $.each(JSON.parse(response.var), function(index, value){                          
       num.push(value.creation_date.replace('00:00:00', '').trim()) ;
  });
  
  