DEV Community


Posted on

[UPDATED] How to Get Form Field Data as JSON Using Plain JavaScript

Thank you
A plain JavaScript example of extracting a form's fields into an object using the field name as the key and the field value as the value. This can work in lieu of things like jQuery's .serialize() or .serializeArray(), which leave something to be desired if we need to work with the form data in JavaScript.

Top comments (0)