Class JSONPathClass

Constructors

Properties

cache: any

Exposes the cache object for those who wish to preserve and reuse it for optimization purposes.

Methods

  • Accepts a normalized or unnormalized path as string and converts to an array: for example, ['$', 'aProperty', 'anotherProperty'].

    Parameters

    • path: string

    Returns string[]

  • Accepts a path array and converts to a normalized path string. The string will be in a form like: $['aProperty']['anotherProperty][0]. The JSONPath terminal constructions ~ and ^ and type operators like @string() are silently stripped.

    Parameters

    • path: string[]

    Returns string

  • Accepts a path array and converts to a JSON Pointer.

    The string will be in a form like: /aProperty/anotherProperty/0 (with any ~ and / internal characters escaped as per the JSON Pointer spec).

    The JSONPath terminal constructions ~ and ^ and type operators like @string() are silently stripped.

    Parameters

    • path: string[]

    Returns any

Generated using TypeDoc