{"id":24383267,"url":"https://github.com/firstandthird/formobj","last_synced_at":"2025-07-28T23:34:36.535Z","repository":{"id":13958402,"uuid":"72934394","full_name":"firstandthird/formobj","owner":"firstandthird","description":"Takes a form and outputs to json","archived":false,"fork":false,"pushed_at":"2022-12-08T14:06:26.000Z","size":490,"stargazers_count":1,"open_issues_count":13,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-20T10:45:42.495Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firstandthird.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-05T15:21:07.000Z","updated_at":"2021-11-20T02:05:08.000Z","dependencies_parsed_at":"2023-01-13T17:42:51.294Z","dependency_job_id":null,"html_url":"https://github.com/firstandthird/formobj","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/firstandthird/formobj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fformobj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fformobj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fformobj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fformobj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firstandthird","download_url":"https://codeload.github.com/firstandthird/formobj/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firstandthird%2Fformobj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266665813,"owners_count":23964974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-19T10:14:02.767Z","updated_at":"2025-07-28T23:34:36.514Z","avatar_url":"https://github.com/firstandthird.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# formobj ![npm](https://img.shields.io/npm/v/formobj.svg) [![Build Status](https://travis-ci.org/firstandthird/formobj.svg?branch=master)](https://travis-ci.org/firstandthird/formobj)\n\nConverts form elements with a `name` attribute to JSON.\n\n## Installation\n\n```sh\nnpm install formobj\n```\n\n## Usage\n\n```html\n\u003cform id=\"SuperAmazingForm\"\u003e\n  \u003cinput type=\"text\" name=\"username\" value=\"superdude\"\u003e\n  \u003cselect name=\"capecolors\" multiple\u003e\n    \u003coption value=\"blue\" selected\u003eBlue\u003c/option\u003e\n    \u003coption value=\"white\"\u003eWhite\u003c/option\u003e\n    \u003coption value=\"red\" selected\u003eRed\u003c/option\u003e\n  \u003c/select\u003e\n  \u003cinput type=\"checkbox\" checked name=\"powerful\"\u003e\n  \u003cinput type=\"checkbox\" name=\"smart\"\u003e\n\u003c/form\u003e\n```\n\n```js\nimport FormObj from 'formobj';\n\nconst form = new FormObj(document.getElementById('SuperAmazingForm'));\n\nconst data = form.getJSON();\n```\n\n## Outputs\n\n```json\n{\n    \"username\": \"superdude\",\n    \"capecolors\": [\"blue\", \"red\"],\n    \"powerful\": true,\n    \"smart\": false\n}\n```\n\n**Note:** Items that share the same name will become an array of values.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fformobj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirstandthird%2Fformobj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirstandthird%2Fformobj/lists"}