Skip to content

Instantly share code, notes, and snippets.

@yoko
Created September 18, 2008 09:02
Show Gist options
  • Save yoko/11401 to your computer and use it in GitHub Desktop.
Save yoko/11401 to your computer and use it in GitHub Desktop.
getKeys = function() {
var obj = {}, ret = [];
$.each($.makeArray(arguments), function(k, v) {
typeof v == 'object' ?
$.each(v, function() { ret.push(arguments[0]); }) :
ret.push(v);
});
return ret;
};
getValues = function() {
var obj = {}, ret = [];
$.each($.makeArray(arguments), function(k, v) {
typeof v == 'object' ?
$.each(v, function() { ret.push(arguments[1]); }) :
ret.push(v);
});
return ret;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment