convert form data in array code example
Example 1: for(let [key,val] in obj){ messageBody = messageBody.replace("{"+ key + "}",val) }
for(let [key,val] in obj){
messageBody = messageBody.replace("{"+ key + "}",val)
}
Example 2: for(let [key,val] in obj){ messageBody = messageBody.replace("{"+ key + "}",val) }
for (let key in obj){
messageBody = messageBody.replace("{"+ key + "}", obj[key])
}