Creates an insert operation with the provided items, position, and reference item.
insert
An insert operation for adding values to arrays https://www.sanity.io/docs/http-patches#febxf6Fk
const prependFoo = insert(['foo'], 'before', 0)const appendFooAndBar = insert(['foo', 'bar'], 'after', someArray.length -1)const insertObjAfterXYZ = insert({name: 'foo'}, 'after', {_key: 'xyz'}]) Copy
const prependFoo = insert(['foo'], 'before', 0)const appendFooAndBar = insert(['foo', 'bar'], 'after', someArray.length -1)const insertObjAfterXYZ = insert({name: 'foo'}, 'after', {_key: 'xyz'}])
Creates an
insert
operation with the provided items, position, and reference item.