Sanity Library Reference Docs
    Preparing search index...

    Function append

    • Creates an insert operation that appends the provided items.

      Returns any

      An insert operation for adding a value to the end of an array. https://www.sanity.io/docs/http-patches#Cw4vhD88

      const appendFoo = append('foo')
      const appendObject = append({name: 'foo'})
      const appendObjects = append([{name: 'foo'}, [{name: 'bar'}]])