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, objectNestLevel, previousPath)
            {      
              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, objectNestLevel + 1, previousPath + objKey + "_" + objKey + "0_");                    
                  }
                  else 
                  { 
                    let objectPath = objKey + "_" + objKey + "0" + "_" + property;
                    objectPath = previousPath.length === 0 ? objectPath : previousPath + objectPath;                     
                    keysOfFieldsArray.push(objectPath);
                  } 
                } 
              } 
            }
function drillIntoObject ( address , objKey , objectNestLevel , previousPath ) { 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 , objectNestLevel + 1 , previousPath + objKey + "_" + objKey + "0_" ) ; } else { let objectPath = objKey + "_" + objKey + "0" + "_" + property ; objectPath = previousPath . length === 0 ? objectPath : previousPath + objectPath ; keysOfFieldsArray . push ( objectPath ) ; } } } }
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. // Assemble the path through the current object to the current data field. // If the current object is nested then prepend the path to include the parent objects. // 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