# How to "remove" a key/value in a JSON object?

**URL:** <https://community.weweb.io/t/how-to-remove-a-key-value-in-a-json-object/8126>\
**Category:** How do I?\
**Created:** [April 15, 2024, 4:36pm UTC](https://community.weweb.io/t/how-to-remove-a-key-value-in-a-json-object/8126 "2024-04-15T16:36:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![what.gift](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/what.gift/32/8069_2.png) [@what.gift](https://community.weweb.io/u/what.gift)\
**Post date:** [April 15, 2024, 4:36pm UTC](https://community.weweb.io/t/how-to-remove-a-key-value-in-a-json-object/8126/1 "2024-04-15T16:36:44Z")

</div>

We can reset an entire variable but not a path. **(reset variable value)**  
We can update a path but not delete. I can set null, but that’s not the same thing. **(change variable value)**. Setting to null will add bloat to my JSON unecessarily.

So how do I delete the key in a nested JSON object variable?

I guess this is custom javscript but I can’t figure it out ☹

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/c/c247f63267d63b913b1a030281ce670a42c2c556.png)

---

<div class="post-metadata">

**Author:** ![Joyce](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/joyce/32/13232_2.png) [@Joyce](https://community.weweb.io/u/Joyce)\
**Post date:** [April 15, 2024, 10:59pm UTC](https://community.weweb.io/t/how-to-remove-a-key-value-in-a-json-object/8126/2 "2024-04-15T22:59:44Z")

</div>

Hi @what.gift 👋

I think this will do the trick. Spoiler alert: no JS involved 🙂

> **[Omit formula — Tella](https://www.tella.tv/video/clv1k2m9g00110flagtjw710n/view)**
>
> Video recording for work

Does that help?

---

<div class="post-metadata">

**Author:** ![what.gift](https://sea2.discourse-cdn.com/flex016/user_avatar/community.weweb.io/what.gift/32/8069_2.png) [@what.gift](https://community.weweb.io/u/what.gift)\
**Post date:** [April 17, 2024, 5:00pm UTC](https://community.weweb.io/t/how-to-remove-a-key-value-in-a-json-object/8126/3 "2024-04-17T17:00:11Z")

</div>

That does help massively - thanks!

I hadn’t considered the “omit” initially as the description of it’s purpose didn’t sound like it was for deleting.

I had to play around with it to target the nested children, but figured it out like this:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/weweb/original/2X/a/a70f9b31243373c399cbf01c46c7de3749c0f159.png)
