lib/inspector.js
function searchAndCompare(specObject, comparisonObject, currentDescription) {

    if (comparisonObject === undefined) {
        comparisonObject = {};
    }

    for (var key in specObject) {
        if (specObject.hasOwnProperty(key)) {
            currentDescription.push(key);
            if (typeof(specObject[key]) === "string") {
                compare(specObject[key], comparisonObject[key], currentDescription);
            } else {
                searchAndCompare(specObject[key].specs, comparisonObject[key], currentDescription);
            }
            currentDescription.pop();
        }
    }
}
function searchAndCompare(specObject, comparisonObject, currentDescription) {

    if (comparisonObject === undefined) {
        comparisonObject = {};
    }

    for (var key in specObject) {
        if (specObject.hasOwnProperty(key)) {
            currentDescription.push(key);
            if (typeof(specObject[key]) === "string") {
                compare(specObject[key], comparisonObject[key], currentDescription);
            } else {
                searchAndCompare(specObject[key].specs, comparisonObject[key], currentDescription);
            }
            currentDescription.pop();
        }
    }
}
function searchAndCompare ( specObject , comparisonObject , currentDescription ) { if ( comparisonObject === undefined ) { comparisonObject = { } ; } for ( var key in specObject ) { if ( specObject . hasOwnProperty ( key ) ) { currentDescription . push ( key ) ; if ( typeof ( specObject [ key ] ) === "string" ) { compare ( specObject [ key ] , comparisonObject [ key ] , currentDescription ) ; } else { searchAndCompare ( specObject [ key ] . specs , comparisonObject [ key ] , currentDescription ) ; } currentDescription . pop ( ) ; } } }
A recursive function to find nested results
A recursive function to find nested results