Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
## 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) {
} else {
// func.apply(key,jsonObj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment