How to inspect FormData?

I’ve tried console.log and looping through it using for in.

Here it the MDN Reference on FormData.

Both attempts are in this fiddle.

var fd = new FormData(),

// poulate with dummy data
fd.append("key1", "alskdjflasj");
fd.append("key2", "alskdjflasj");

// does not do anything useful

// does not do anything useful   
for(key in fd) {

How can I inspect form data to see what keys have been set.

65 thoughts on “How to inspect FormData?”

Leave a Comment