title: How to convert a dynamic JSON like file to a CSV file
body: <p>I have a file which looks exactly as below.</p>
  
  <pre><code>{"eventid" : "12345" ,"name":"test1","age":"18"}
  {"eventid" : "12346" ,"age":"65"}
  {"eventid" : "12336" ,"name":"test3","age":"22","gender":"Male"}
  </code></pre>
  
  <p>Think of the above file as event.json</p>
  
  <p>The number of data objects may vary per line.
  I would like the following csv output. and it would be output.csv</p>
  
  <pre><code>eventid,name,age,gender
  12345,test1,18
  12346,,65
  12336,test3,22,Male
  </code></pre>
  
  <p>Could someone kindly help me? I could accept the answer from an any scripting language (Javascript, Python and etc.).</p>