title: Transforming a row-based JSON in a column-based JSON
body: <p>I would like to transform a row-based JSON in a column-based JSON. I receive the JSON in a row-based form and will do some visualization with it, which would be easier in a column-based form. </p>
  
  <p>row-based would look something like this: </p>
  
  <pre><code>{
    "0": {
      "fname": "John", 
      "lname": "Miller", 
      "age": 50
    }, 
    "1": {
      "fname": "Eve", 
      "lname": "Johnson", 
      "age": 40
    }...
  </code></pre>
  
  <p>Example column-based: </p>
  
  <pre><code>{
    "fname": {
      "0" : "John", 
      "1" : "Eve"
    }, 
    "lname": {
      "0" : "Miller", 
      "1" : "Johnson"
    }, 
    "age": {
      "0": 50, 
      "1" : 40
    }...
  </code></pre>
  
  <p>Is there a more efficient way than just looping through all elements and rewriting the JSON completely?</p>
  
  <p>Thanks! </p>