Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: delete keys from a Map by selector #141

Open
dgunay opened this issue Aug 11, 2023 · 0 comments
Open

Feature request: delete keys from a Map by selector #141

dgunay opened this issue Aug 11, 2023 · 0 comments

Comments

@dgunay
Copy link

dgunay commented Aug 11, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant