@umbraco-cms/backoffice

    Function extractJsonQueryProps

    • Extracts properties and their values from a JSON path query.

      Parameters

      • query: string

        The JSON path query.

      Returns Record<string, string>

      An object containing the properties and their values.

      const query = `?(@.culture == 'en-us' && @.segment == 'mySegment')`;
      const props = extractJsonQueryProps(query);
      console.log(props); // { culture: 'en-us', segment: 'mySegment' }
    MMNEPVFCICPMFPCPTTAAATR