{"action":"opened","issue":{"url":"https://api.github.com/repos/kevindb/jquery-load-json/issues/19","repository_url":"https://api.github.com/repos/kevindb/jquery-load-json","labels_url":"https://api.github.com/repos/kevindb/jquery-load-json/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/kevindb/jquery-load-json/issues/19/comments","events_url":"https://api.github.com/repos/kevindb/jquery-load-json/issues/19/events","html_url":"https://github.com/kevindb/jquery-load-json/issues/19","id":144304524,"number":19,"title":"Enhance to support hidden+checkboxes with identical name","user":{"login":"charleslyk","id":8639393,"avatar_url":"https://avatars.githubusercontent.com/u/8639393?v=3","gravatar_id":"","url":"https://api.github.com/users/charleslyk","html_url":"https://github.com/charleslyk","followers_url":"https://api.github.com/users/charleslyk/followers","following_url":"https://api.github.com/users/charleslyk/following{/other_user}","gists_url":"https://api.github.com/users/charleslyk/gists{/gist_id}","starred_url":"https://api.github.com/users/charleslyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charleslyk/subscriptions","organizations_url":"https://api.github.com/users/charleslyk/orgs","repos_url":"https://api.github.com/users/charleslyk/repos","events_url":"https://api.github.com/users/charleslyk/events{/privacy}","received_events_url":"https://api.github.com/users/charleslyk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-29T15:42:45Z","updated_at":"2016-03-29T15:42:45Z","closed_at":null,"body":"Hi Kevin, first of all, thank you for taking the effort to maintain this library.\r\n\r\nI'm currently encountering a scenario where the library does not work.  In essence, when I have the following (for the purpose of having a default value instead of \"\"), jquery-load-json does not work:\r\n\r\n```\r\n<input type=\"hidden\" name=\"PreferencePrimary\" value=\"XXX\" />\r\n<input type=\"checkbox\" name=\"PreferencePrimary\" value=\"P1\" />P1\r\n<input type=\"checkbox\" name=\"PreferencePrimary\" value=\"P2\" />P2\r\n```\r\n\r\nTo enhance the library to support this, I've made the following changes.\r\n\r\n\r\nAdd before line 274 (v1.3.1)\r\n\r\n```javascript\r\nelse if (element.length > 0 && element.filter('input:hidden').length > 0 && element.filter(':checkbox').length > 0) {\r\n                    element.filter(':checkbox').each(function () {\r\n                        setElementValue(this, obj, name);\r\n                    });\r\n                } else if (element.length > 0 && element[0].type == 'checkbox') {\r\n```\r\n\r\nThanks! Please accept my apologies if I'm not adhering to any protocol since I'm still pretty new to Github."}}