title: javascript array to two dimension array
body: <p>i have a javascript array like this </p>
  
  <pre><code>var myArr = [  
  
     {  
        "Year":"2015",
        "Month":"January",
        "Value":"15.8",
        "District":"Anuradhapura",
        "type":"Rainfall"
     },
     {  
        "Year":"2015",
        "Month":"January",
        "Value":"31.1",
        "District":"Anuradhapura",
        "type":"Temparature"
     },
     {  
        "Year":"2015",
        "Month":"January",
        "Value":"4",
        "District":"Anuradhapura",
        "type":"Wind"
     },
     {  
        "Year":"2015",
        "Month":"January",
        "Value":"69",
        "District":"Anuradhapura",
        "type":"Humidity"
     }
  ]
  </code></pre>
  
  <p>what i need is to put <code>type</code> and <code>Value</code> data into 2 dimension array. my end result should be like this; </p>
  
  <pre><code> var data = [  
         [  
            "Rainfall",
            158
         ],
         [  
            "Temparature",
            31.1
         ],
         [  
            "Wind",
            4
         ],
         [  
            "Humidity",
            69
         ]
      ]
  </code></pre>
  
  <p>note that <code>myArr</code> results i'm getting from the backend service and the length of this array can be change dynamically. how can i do this. thanks </p>