lib/z_Original_Working_meta.js
// Declare a function that we will use to drill into the object.
Declare a function that we will use to drill into the object.
Declare a function that we will use to drill into the object .
function drillIntoObject(address, objKey, previousObjKey, objectNestLevel)
            {      
              if(address[objKey][objKey + "0"])
              { 
                for (let property in address[objKey][objKey + "0"])
                {
                  if(address[objKey][objKey + "0"][property][property + "0"])
                  {
                    drillIntoObject(address[objKey][objKey + "0"], property, objKey, objectNestLevel + 1);
                  }
                  else 
                  { 
                    let defaultElementsObject = address[objKey][objKey + "0"][property].defaultElements;
                    for (let key in defaultElementsObject) 
                    {
                      htmlString = htmlString + 
                      "  !" + key + "Array.some(function(element){if(element){return true;}})" + "\n" + "    &&";
                    }
                  } 
                } 
              } 
            }
function drillIntoObject ( address , objKey , previousObjKey , objectNestLevel ) { if ( address [ objKey ] [ objKey + "0" ] ) { for ( let property in address [ objKey ] [ objKey + "0" ] ) { if ( address [ objKey ] [ objKey + "0" ] [ property ] [ property + "0" ] ) { drillIntoObject ( address [ objKey ] [ objKey + "0" ] , property , objKey , objectNestLevel + 1 ) ; } else { let defaultElementsObject = address [ objKey ] [ objKey + "0" ] [ property ] . defaultElements ; for ( let key in defaultElementsObject ) { htmlString = htmlString + "  !" + key + "Array.some(function(element){if(element){return true;}})" + "\n" + "    &&" ; } } } } }
Declare a function that we will use to drill into the object.
Declare a function that we will use to drill into the object .
// if the subfield is also an object then this function calls itself using the subfield parameters. // This will continue drilling in until we are at the end of the branches // Check each property of the subobject to see if it too is an object. // If the property is also an object // This function calls itself so as to go deeper into the object // This property is not an object. We are at the end of the branch where we encounter a data field. // Looping for the rare case when there is more than one defaultElement associated with a field.                     // "!" + objectPath.split("_").slice(0, -1).join("_") + "_" + key + " && "; // End of: else - This property is not an object. // End of: for-let Check each property of the subobject to see if it too is an object. // End of: if the subfield is also an object