title: Javascript: Split array of arrays into multiple arrays
body: <p>serious problem here, I have an array like this:</p>
  
  <pre><code>[[0,50],[0,68],[1,26],[2,9],[2,32]]
  </code></pre>
  
  <p>The form I need is to split this array into two separated arrays like this:</p>
  
  <pre><code>array1 = [[0,50][1,0][2,9]]
  array2 = [[0,68][1,26][2,32]]
  </code></pre>
  
  <p>Yeah you are right guys, I need that to build flot chart.</p>
  
  <p>If anybody interested in source of data this is how it looks in firebase:</p>
  
  <pre><code>{
    "1433203200000" : {
      "-JpgJnANTpQFprRieImv" : {
        "events" : 5,
        "name" : "Home office",
        "returningVisitors" : 9,
        "totalVisitors" : 50
      },
      "-JqsQjFTjHpzKqWgE_KJ" : {
        "events" : 10,
        "name" : "Samin Place",
        "returningVisitors" : 32,
        "totalVisitors" : 68
      }
    },
    "1433289600000" : {
      "-JqsQjFTjHpzKqWgE_KJ" : {
        "name" : "Samin Place",
        "newVisitors" : 1,
        "returningVisitors" : 25,
        "totalVisitors" : 26
      }
    },
    "1433376000000" : {
      "-JpgJnANTpQFprRieImv" : {
        "events" : 5,
        "name" : "Home office",
        "returningVisitors" : 9,
        "totalVisitors" : 9
      },
      "-JqsQjFTjHpzKqWgE_KJ" : {
        "events" : 10,
        "name" : "Samin Place",
        "returningVisitors" : 32,
        "totalVisitors" : 32
      }
    }
  }
  </code></pre>
  
  <p>The point is loop each timestamp and each child, there we have totalVisitors that's the value I need for my chart.</p>
  
  <p><strong>BONUS</strong></p>
  
  <p>As you can see first timestamp have two childs thats fine, but second timestamp have only one child - "-JqsQjFTjHpzKqWgE_KJ" so I need to add null value for missing one into new array (in our example it's array1 second position).</p>
  
  <p>That's what I'm calling <strong>CHALLENGE</strong> :)</p>
  
  <p>Any help is very appreciated, thanks for attention.</p>
  
  <p>Edit:</p>
  
  <p>maybe if it can help to someone this is chart which I need</p>
  
  <p><a href="http://i.stack.imgur.com/GRaHS.jpg" rel="nofollow">here is link</a></p>
  
  <p>X-axis - are timestamps<br/>
  Y-axis - totalVisitors value<br/>
  Lines - every unique timestamp child</p>