Sanity App SDK
    Preparing search index...

    Function jsonMatch

    • Beta

      A very simplified implementation of JSONMatch that only supports:

      • descent e.g. friend.name
      • array index e.g. items[-1]
      • array matching with _key e.g. items[_key=="dd9efe09"]
      • array matching with a range e.g. items[4:]

      E.g. friends[_key=="dd9efe09"].address.zip

      Type Parameters

      • TDocument
      • TPath extends string

      Parameters

      Returns MatchEntry<DeepGet<TDocument, PathParts<TPath>>>[]

    • Beta

      Type Parameters

      • TValue

      Parameters

      • input: unknown
      • path: string

      Returns MatchEntry<TValue>[]