Skip to content

Instantly share code, notes, and snippets.

@stibi
Created May 27, 2012 01:02
Show Gist options
  • Save stibi/2795773 to your computer and use it in GitHub Desktop.
Save stibi/2795773 to your computer and use it in GitHub Desktop.
form serialization
$("#groups .permissionsBlock").children().each(function(i, group) {
data["groups"][i] = {"groupName" : $(group).attr("id"), "members" : []};
$(this).children("select").children().each(function(x, user) {
data["groups"][i]["members"][x] = user.text;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment