Skip to content

@nelix /gist:140193 forked from auser/gist:139933
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
## Function
traverse("object", obj, function(key, val) {console.log(key, val)});
## Call
function traverse(key, jsonObj, func) {
if( typeof jsonObj == "object" ){
$.each(jsonObj, function(k,v) {
traverse(k,v);
})
} else {
console.log(func);
// func.apply(key,jsonObj);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.