title: Converting a hex encoded iso 8583 message to json using node js
body: <p>I am using this library: <a href="https://github.com/zemuldo/iso_8583" rel="nofollow noreferrer">https://github.com/zemuldo/iso_8583</a> to try parse and dump an ISO 8583 message.</p>
  
  <p>The <strong>code</strong>: </p>
  
  <pre><code>var bitMapData = '0210723A40010AE18002005000990000000750001002102636000000172636100210036014045016000042 (i'am using this library https://github.com/zemuldo/iso_8583)667818001               000000000TS0002tester                                  0490823 75551512000000075000000000010051003915030257360006133001';
  
  const config = {
      lenHeader: false, 
      lenHeaderEncoding: 'utf8', 
      bitmapEncoding: 'utf8', 
      secondaryBitmap: false, 
      hasSpecialFields: true,
  };
  
  let incoming = new Iso_8583().getIsoJSON(
      new Buffer.alloc(bitMapData.length, bitMapData),
      config
      );
  
  console.log(incoming)
  </code></pre>
  
  <p><strong>result of code</strong>:</p>
  
  <pre><code>{   
          '0': '0210',   
          '2': '00100210263600000017263610021003601404501600004266',   
          '3': '781800', 
          '4': '1',   
          '7': '    000000',   
          '11': '000TS0',   
          '12': '002tes',   
          '13': 'ter ',   
          '15': '    ',   
          '18': '    ',   
          '32': '',  
          '37': '            ',   
          '39': '  ',   
          '41': '        ',   
          '42': ' 0490823 755515',   
          '43': '1200000007500000000001005100391503025736',   
          '48': '',   
          '49': '613',   
          '63': '1',   
          '74': '',   
          '76': '',   
          '89': '',   
          '92': '',   
          '93': '',   
          '96': '',   
          '126': '',   
          '128': ''  
      }
  </code></pre>
  
  <p><strong>Result what I need</strong>:</p>
  
  <pre><code>{  
      '0': '0201',  
      '2': '',  
      '3': '500099',  
      '4': '000000075000',  
      '7': '1002102636',  
      '11': '000000',  
      '12': '172636',   
      '13': '1002',  
      '15': '1003',  
      '18': '6014',  
      '32': '5016',  
      '37': '000042667818',  
      '39': '00',  
      '41': '1',  
      '42': '000000000TS0002',  
      '43': 'tester',  
      '48': '0823 75551512000000075000000000010051003915030257',  
      '49': '360',   
      '63': '133001' 
  }
  </code></pre>