我收到以下錯誤的第三行:陣推方法不能正常工作
Can not set property accountName of Undefined
誰能幫助?
var temp = [];
temp.accountId = newData.Account.Id;
temp.accountType = newData.Account.Type;
temp.accountholder.accountName = newData.Account.Name;
finaloutput.push(temp);
您在此處顯示了一些有趣的Javascript行爲。但是我不知道你是否明確地設置了'temp.accountholder';) – loveNoHate
finaloutput數組有帳戶 – user3421352
'temp.accountholder'是未定義的。使它不被定義,你不會有這個問題。 –