ixfx
    Preparing search index...

    Function getPaths

    • Iterates 'paths' for all the fields on o

      const d = {
      accel: { x: 1, y: 2, z: 3 },
      gyro: { x: 4, y: 5, z: 6 }
      };
      const paths = [...getFieldPaths(d)];
      // Yields [ `accel`, `gyro`, `accel.x`, `accel.y`,`accel.z`,`gyro.x`,`gyro.y`,`gyro.z` ]

      Use getField to fetch data based on a path

      If object is null or undefined, no results are returned.

      If onlyLeaves is true (default: false), only 'leaf' nodes are included. Leaf nodes are those that contain a primitive value.

      const paths = getFieldPaths(d, true);
      // Yields [ `accel.x`, `accel.y`,`accel.z`,`gyro.x`,`gyro.y`,`gyro.z` ]

      Options:

      • onlyLeaves: If true, only paths to 'leaf' nodes are included. Leaf nodes are those that contain a primitive value. Default: false
      • withPrototype: If true, includes prototype chain. Default: false

      Parameters

      • object: object | null

        Object to get paths for.

      • options: Partial<GetPathsOptions> = {}

        Options

      Returns Generator<string>