I have an array of email addresses and an array of passwords. I want to send each password to its corresponding email address(email at same index) in the body of email. But I don't want to use a loop. Is it possible to use substitution in the email body and then have sendgrid pick a value from the password array for each email address. I know I can construct a personalizations object like so :
personalizations: {to: [{email: "email1"}], substitutions: {"-pwd-": "pwd1"}}
and then use -pwd- in the body of email. But to construct this object I again have to use a loop which I don't want.