Reputation: 201
function readMetaData() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getSheetByName(METADATA_SHEET);
var range = sheet.getRange(1,2);
var sprintFixVersion = range.getValue();
var range = sheet.getRange(2,2);
var hotfixAndPatchVersion = range.getValue();
Logger.log(sprintFixVersion);
Logger.log(hotfixAndPatchVersion);
return {
"sprintFixVersion":sprintFixVersion,
"hotfixAndPatchVersion": hotfixAndPatchVersion
};
}
above method returns two value, but while calling a function I need only one value at a time means either sprintFixVersion or hotfixAndPatchVersion. Is there any way to achieve this?
Upvotes: 1
Views: 49
Reputation: 1198
If you just want to access one of those properties it's pretty simple. For example:
var hotfixVersion = readMetaData().hotfixAndPatchVersion;
Upvotes: 2