title: Node.js (csvtojson) by selecting specific columns from excel
body: <p>I'm testing a new process from my system where I need to import a csv spreadsheet to my <code>database</code>, but the excel I'm imputing has many unnecessary columns I'd like to select specific columns for import example:</p>
  
  <pre><code>&gt; **VERSION_ID  TN       RN1          DATA         OPERACAO    CN**
  &gt; 24246610   3000010300 55115     26/11/2012 22:02     1        11
  &gt; 28610111   3000012345 55115     06/08/2013 23:03     1        11
  &gt; 23041462   3000026314 55115     18/09/2012 23:01     1        11
  &gt; 33418254   3000052576 55115     27/06/2014 01:00     1        11
  </code></pre>
  
  <p><strong>I need to do the code in the code to select in JSON only the TN and RN1 columns</strong></p>
  
  <p>My code already converts csv to JSON but it takes all the columns of excel..</p>
  
  <p>Code: </p>
  
  <pre><code>var Converter = require("csvtojson").Converter;
  
  var fs=require("fs"); 
  //CSV File Path or CSV String or Readable Stream Object
  var csvFileName="teste.csv";
  
  //new converter instance
  var csvConverter=new Converter({});
  
  //end_parsed will be emitted once parsing finished
  csvConverter.on("end_parsed",function(jsonObj){
      console.log(jsonObj); //here is your result json object
  });
  
  //read from file
  fs.createReadStream(csvFileName).pipe(csvConverter);
  </code></pre>