code: function flattenProperties (obj, prefix = null, globals = {}) {
      prefix = prefix ? (prefix + '.') : 'global.';
  
      for (const p in obj) {
          const key = prefix + p;
          const val = obj[p];
          globals[key] = val;
  
          if (typeof val === 'object' && !Array.isArray(val)) {
              flattenProperties(val, key, globals);
          }
      }
      return globals;
  }
docs: Flatten nested properties for simpler string look-ups