I love JQuery-style argument parsing and want to use it in my own function:
foo( { 'name': 'bob', 'age': 21 });
function foo (param){
alert($.isEmptyObject(param)); //shows true
//now what? :-)
//param.prop('name'); does not work
//$param=$(param); $param.prop('name'); still does not work
//treating it as an array also does not work
}
How can I get at the data I passed?
I’m not sure what you are exactly doing, but this works just fine: