getobject returning exact value instead of json object

Solutions on MaxInterview for getobject returning exact value instead of json object by the best coders in the world

showing results for - "getobject returning exact value instead of json object"
Edie
11 Sep 2020
1//----this is the part u need to get the value of the s3 object instead of a JSON or payload undefined----
2
3var s3 = new AWS.S3();
4
5var params = { 
6 Bucket: 'iot-es-data',
7// Delimiter: '/',
8 Prefix: 'iot-data'
9}
10var count = 0;
11s3.listObjects(params, function (err, data) {
12 
13 if(err)throw err;
14 // console.log(data);
15 var c = data;
16
17 var a = c.Contents;
18 console.log(c.Contents[0]);
19  //----Case Sensitive------
20 console.log(a.Key);
21
similar questions