fkrauthan
06/04/2018, 7:29 PMfor (let i = 0; i < clientAccounts.length; i++) {
log.debug({title: 'Trying to Match', details: {
hasNetsuiteAccount: clientAccounts[i].netsuiteAccount,
accountIdOne: clientAccounts[i].netsuiteAccount.id,
accountIdTwo: accountId,
match: clientAccounts[i].netsuiteAccount.id === accountId,
}});
if (clientAccounts[i].netsuiteAccount && clientAccounts[i].netsuiteAccount.id === accountId) {
matchingAccount = true;
break;
}
} for some reason it always reads the first value of the array rather then iterating thru it