ixfx
    Preparing search index...

    Function getRecordEntryByPath

    • Returns the closest matching entry, tracing path in an array, Map or simple object. Returns an entry with undefined value at the point where tracing stopped. Use traceRecordEntryByPath to step through all the segments.

       * const people = {
      * jane: {
      address: {
      postcode: 1000,
      * street: 'West St',
      * city: 'Blahville'
      },
      colour: 'red'
      * }
      }
      Trees.getByPath('jane.address.postcode', people); // '.' default separator
      // ['postcode', 1000]
      Trees.getByPath('jane.address.country.state', people);
      // ['country', undefined] - since full path could not be resolved.

      Type Parameters

      • T extends object

      Parameters

      • path: string

        Path, eg jane.address.postcode

      • node: T

        Node to look within

      • options: Records.PathOpts = {}

        Options for parsing path. By default '.' is used as a separator

      Returns RecordEntry