👋 Next.js Conf 2024: Come build, party, run, and connect with us! See all events

Removing a Property from a Document in Vision

1 replies
Last updated: Jan 6, 2022
Hej help!
I’m trying to remove a property from a document in vision.


{
  "mutations": [
    {
      "patch": {
        "id": "<_id>",
        "unset": ["property"]
      }
    }
  ]
}
but running
*[_id == "<_id>"]
shows me that the property remains unchanged. What am I missing?
Do I maybe not have editing rights in vision?
Jan 6, 2022, 11:09 AM
Solved, I tried the mutation again using
curl
and it worked
Jan 6, 2022, 1:17 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?