How to retrieve specific columns from an Azure storage table using JavaScript API?

I would like to know if it’s possible to retrieve only certain columns from an Azure storage table using the JavaScript SDK. Currently, I can retrieve the entire row, but I’m interested in obtaining just a selection of columns.

Here’s the code I use to fetch the full row from the Azure table:

const storageUrl = "https://mytable.storage.core.windows.net";
const storageService = AzureStorage.Table.createTableServiceWithSas(storageUrl, sasToken);
const query = new AzureStorage.Table.TableQuery().top(100).where('PartitionKey eq ?', partitionKey);

storageService.queryEntities('MessageLogs', query, null, function(err, response, res) {
   // process the returned data
});

To retrieve specific columns from an Azure Storage Table using the JavaScript SDK, you can use the select(...columns) method on your query object:

const storageUrl = "https://mytable.storage.core.windows.net";
const storageService = AzureStorage.Table.createTableServiceWithSas(storageUrl, sasToken);
const query = new AzureStorage.Table.TableQuery()
    .select('Column1', 'Column2') // specify columns here
    .top(100)
    .where('PartitionKey eq ?', partitionKey);

storageService.queryEntities('MessageLogs', query, null, function(err, response, res) {
   // process the specific columns' data
});

Replace 'Column1', 'Column2' with the columns you want to retrieve.