objx icon indicating copy to clipboard operation
objx copied to clipboard

Feature request: delete keys from a Map by selector

Open dgunay opened this issue 2 years ago • 1 comments

I found myself wanting to do something like this

m := objx.New(data)
m.Delete("foo.bar")

But didn't see any way of doing that without casting back to map[string]any and doing it myself. It would be nice to have this. I worked around it by using m.Set("foo.bar", nil), but that may not work for other peoples' use cases.

dgunay avatar Aug 11 '23 22:08 dgunay

No updates on this feature?

We on Fuse are starting to use the objx pkg as our internal key-value store.

We would like to have a delete method option

gustavobertoi avatar Apr 24 '25 21:04 gustavobertoi