递归对象属性

https://stackoverflow.com/questions/12295494/jquery-how-to-recursively-loop-over-an-objects-nested-properties

function recursiveIteration(object) {
    for (var property in object) {
        if (object.hasOwnProperty(property)) {
            if (typeof object[property] == "object"){
                recursiveIteration(object[property]);
            }else{
                //found a property which is not an object, check for your conditions here
            }
        }
    }
}

你可能感兴趣的:(递归对象属性)