@umbraco-cms/backoffice
    Preparing search index...

    Function umbQueryMapperForJsonPaths

    • Helper method to replace paths index with queries and additionally map the paths.

      Type Parameters

      • T

      Parameters

      • scopePaths: string[]

        the JSON paths to map.

      • scopeData: T[]

        the data corresponding to each entry, used to construct queries.

      • queryConstructor: (entry: T) => string

        constructs a JSON-Path query for a given data entry.

      • Optionalmapper: (scopedPaths: string[], propertyData: T | undefined) => Promise<string[]>

        map function which receives the paths in the scope and returns the resolved paths.

      Returns Promise<string[]>

      • the paths, including the once mapped by the scoped mapper. Notice the order is kept.