Answers for "getObject returning exact value instead of JSON Object"

0

getObject returning exact value instead of JSON Object

//----this is the part u need to get the value of the s3 object instead of a JSON or payload undefined----

var s3 = new AWS.S3();

var params = { 
 Bucket: 'iot-es-data',
// Delimiter: '/',
 Prefix: 'iot-data'
}
var count = 0;
s3.listObjects(params, function (err, data) {
 
 if(err)throw err;
 // console.log(data);
 var c = data;

 var a = c.Contents;
 console.log(c.Contents[0]);
  //----Case Sensitive------
 console.log(a.Key);
Posted by: Guest on September-17-2021

Code answers related to "getObject returning exact value instead of JSON Object"

Code answers related to "Javascript"

Browse Popular Code Answers by Language