title: convert txt file to json in nodejs
body: <p>I have a <code>.txt</code> file which consists of pipe delimited data. Like below.</p>
  <pre><code>HEADER1|HEADER2|HEADER3
  Value1|Value2|Value3
  Value4|Value5|Value6
  Value7|Value8|Value9
  </code></pre>
  <p>I want to able to return array of objects like the following from the text file.</p>
  <pre><code>[
    { HEADER1: 'Value1', HEADER2: &quot;Value2&quot;, HEADER3: 'Value3' },
    { HEADER1: 'Value4', HEADER2: &quot;Value5&quot;, HEADER3: 'Value6' },
    { HEADER1: 'Value7', HEADER2: &quot;Value8&quot;, HEADER3: 'Value9' }
  ]
  </code></pre>
  <p>How can I achieve this?</p>