Serialize Form to JSON

JavaScript Medium 3 views
Back to Questions

Problem Description

You have a form #f and a
. On submit, prevent default and print JSON of all fields into #out. Multiple same-name fields should become an array.

Input Format

No input.

Output Format

No output (DOM change).

Constraints

Assume #f form and #out exist.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next