I\'ve tried console.log
and looping through it using for in
.
Here it the MDN Reference on FormData.
Both attempts are in this fi
The MDN suggests the following form:
let formData = new FormData();
formData.append('name', 'Alex Johnson')
for(let keyValuePair of formData.entries()){
console.log(keyValuePair); //has form ['name','Alex Johnson']
}
Alternatively
for (let [key, value] of formData.entries()) {
console.log(key, ':', value);
}
Consider adding ES+ Polyfills, in case the browser or environment doesn't support latest JavaScript and FormData API.
I hope this helps.