title: Convert grouped strftime time to integer
body: <p>I have this code (I'm going to pass it as JSON data for highchart JS)</p>
  
  <pre><code>&lt;%= ItemSale.pluck(:item_id).uniq.map{|item_id| {
  name: Item.find(item_id).name, 
  data: @item_sales.where(item_id: item_id).group_by_day(:date_sold,
  format: "%s").count.to_a}}.to_json %&gt;
  </code></pre>
  
  <p>That returns:</p>
  
  <pre><code>[{"name":"Computer","data":[["1456790400",2],["1456876800",0],["1456963200",1]]},{"name":"Android Phones","data":[["1456876800",3],["1456963200",0],["1457049600",1],["1457136000",0],["1457222400",0],["1457308800",2]]}]
  </code></pre>
  
  <p>However, I need this:</p>
  
  <pre><code>["1457049600",1]
  </code></pre>
  
  <p>to be an integer and multiplied to 1000 like this:</p>
  
  <pre><code>[1457049600000,1]
  </code></pre>
  
  <p>I tried doing sample data to make sure that it is correct and it is working:</p>
  
  <pre><code>@item_sales_series = [{"name":"Computer","data":[[1456790400000,2],[1456876800000,0],[1456963200000,1]]},{"name":"Android Phones","data":[[1456876800000,3],[1456963200000,0],[1457049600000,1],[1457136000000,0],[1457222400000,0],[1457308800000,2]]}].to_json
  </code></pre>
  
  <p>Is it possible or is there a way to </p>
  
  <pre><code>group_by_day(:date_sold, format: "%s").count.to_a
  </code></pre>
  
  <p>to output integer instead of string and also multiply it by 1000?</p>
  
  <p>I use the group date gem to group my data by dates. Also I'm not using Highchart gems for this project, I'm trying different approach of inserting data into charts.</p>