title: How do you modify array mapping data structure resultant from Ruby map?
body: <p>I believe that I may be missing something here, so please bear with me as I explain two scenarios in hopes to reconcile my misunderstanding:</p>
  
  <p>My end goal is to create a dataset that's acceptable by <a href="http://www.highcharts.com" rel="nofollow">Highcharts</a> via <a href="https://github.com/michelson/lazy_high_charts" rel="nofollow">lazy_high_charts</a>, however in this quest, I'm finding that it is rather particular about the format of data that it receives.</p>
  
  <p><strong>A)</strong> I have found that when data is formatted like this going into it, it draws the points just fine:</p>
  
  <pre><code>[0.0000001240,0.0000000267,0.0000000722, ..., 0.0000000512]
  </code></pre>
  
  <p>I'm able to generate an array like this simply with:</p>
  
  <pre><code>array = Array.new
  
  data.each do |row|
    array.push row[:datapoint1].to_f
  end
  </code></pre>
  
  <p><strong>B)</strong> Yet, if I attempt to use the <code>map</code> function, I end up with a result like and Highcharts fails to render this data:</p>
  
  <pre><code>[[6.67e-09],[4.39e-09],[2.1e-09],[2.52e-09], ..., [3.79e-09]]
  </code></pre>
  
  <p>From code like:</p>
  
  <pre><code>array = data.map{|row| [(row.datapoint1.to_f)] }
  </code></pre>
  
  <p><strong>Is there a way to coax the map function to produce results in B that more akin to the scenario A resultant data structure?</strong></p>
  
  <hr>
  
  <p>This get's more involved as I have to also add datetime into this, however that's another topic and I just want to understand this first and what can be done to perhaps further control where I'm going.</p>
  
  <p>Ultimately, <strong><em>EVEN SCENARIO B SHOULD WORK</em></strong> according to the data in the example here: <a href="http://www.highcharts.com/demo/spline-irregular-time" rel="nofollow">http://www.highcharts.com/demo/spline-irregular-time</a> (press the "View options" button at bottom)</p>
  
  <p>Heck, I'll send you a sucker in the mail if you can fill me in on that part! ;)</p>