How to add an array value to new FormData?

javascript, jquery

Solution

var formData = new FormData($("form#formid")[0]);
formData.append("key", "value")

See https://developer.mozilla.org/en/XMLHttpRequest/FormData

Problem

On form submission I'm using jQuery to gather data including files and creating a FormData Object of the form values using: ``` var formData = new FormData($("form#formid")[0]); ``` but how can I add another value and it's key to this FormData Object?

Original source