Last active
October 30, 2020 14:40
-
-
Save araphiel/a90762187a9e4e18c1e409b979a69ce3 to your computer and use it in GitHub Desktop.
Grab fields from a form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.values(document.forms[0]).reduce((obj,field) => { obj[field.name] = field.value; return obj }, {}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment