I want to get the contents of a folder and call this command -> "sftp.list (...)".
But this will return a Promise object. How can I get to the name of this content??
I've attached my code below, but I always just get ALL INFOS back.
var a = sftp.list(remoteFilename);
a.then(function(result){
   console.log(a);
});
OUTPUT:
  { type: '-',
    name: '14335.JSON',
    size: 482369,
    modifyTime: 1549637889000,
    accessTime: 1549541207000,
    rights: { user: 'rw', group: 'rw', other: 'rw' },
    owner: 98438,
    group: 840223400513 } ]
But i want only the name from the files.
 
    