我嘗試從Google電子表格中將值傳遞給JSON。但是我得到一個無效的json字符串錯誤。你能幫我解決我做錯的地方嗎?從Google Apps腳本中的電子表格傳遞JSON值
請在下面找到
代碼的代碼片段:
for(var i=0;i>=10;i++)
{
var userEmail = sheet.getRange(3, 2, sheet.getLastRow()).getValues();
var owner = {
email: userEmail[i],
role: 'OWNER'
};
owner = AdminDirectory.Members.insert(owner, groupEmail);
Logger.log('User %s added as a owner of group %s.', userEmail, groupEmail);
Browser.msgBox("Owner Successfully Added!");
}