title: How to convert JSON data into table and store into Postgres DB using Node JS?
body: <p>I need help in converting json data into datatable and store inside postgresql DB.</p>
  
  <p>For example,</p>
  
  <pre><code>[{"name":"abc", "role":"swe"}, {"name":"xyz", "role":"Tester"}]
  </code></pre>
  
  <p>I'd like to convert the above data or lets say store the data as a table with rows and columns.</p>
  
  <p>I think we do have a datatype called "json" but it's to store the entire json right? But I want to convert as real table what we see in DB, like below,</p>
  
  <pre><code>   name   |  role       
  --------------+-------
  "abc"     | "swe"
  "xyz"     | "Tester
  </code></pre>
  
  <p>Could you please help me how to parse them please? I'm using Node JS.</p>
  
  <p>Any pointers will be helpful. Thanks a lot for your time.</p>