title: How to decode data from kinesis.getRecords in Javascript SDK?
body: <p>I'm trying to get data from Kinesis data stream:</p>
  
  <pre><code>function getRecord(shard_iterator) {
  
      var getRecParams = {
          ShardIterator: shard_iterator
      };
  
      kinesis.getRecords(getRecParams, function(err, result) {
              // Loop through all the packages
              for (var record in result.Records) {
                  console.log(JSON.stringify(result.Records[record].Data));
                  break; // just to see the first one
              }
              //if (result.NextShardIterator) getRecord(result.NextShardIterator);
      });
  }
  </code></pre>
  
  <p>The result I see:</p>
  
  <pre><code>{"type":"Buffer","data":[123,34,73,110,112,117....,125]}
  </code></pre>
  
  <p>Form AWS CLI I know <code>data</code> should be base64-encoded, but here is something different. So how can I get info from the <code>data</code> array I see?</p>
  
  <p>Pls note it's not NodeJS but Javascript in browser.</p>