title: How to map an object to arrays so it can be converted to csv?
body: <p>I'm trying to convert an object that looks like this:</p>
  
  <pre><code>{
    "123" : "abc",
    "231" : "dbh",
    "452" : "xyz"
  }
  </code></pre>
  
  <p>To csv that looks like this:</p>
  
  <pre><code>"123","abc"
  "231","dbh"
  "452","xyz"
  </code></pre>
  
  <p>I would prefer to use the command line tool <a href="http://stedolan.github.io/jq/manual/" rel="noreferrer">jq</a> but can't seem to figure out how to do the assignment. I managed to get the keys with <code>jq '. | keys' test.json</code> but couldn't figure out what to do next.</p>
  
  <p>The problem is you can't convert a k:v object like this straight into csv with <code>@csv</code>. It needs to be an array so we need to convert to an array first.  If the keys were named, it would be simple but they're dynamic so its not so easy.</p>