Sanity Library Reference Docs
    Preparing search index...
    • Return a copy of the params with one scope read replaced. The original params are unchanged; containers along the assignment path are copied or created when missing.

      Negative indices count from the end of the existing array. For example, -1 replaces its last element and cannot be assigned in an empty array.

      Parameters

      Returns Record<string, unknown>

      If an index exceeds MAX_COUNTERFACTUAL_INDEX, or a negative index resolves before the start of its array.