Skip to content
Advertisement

Tag: lodash

Best way to reset all values in an Javascript object

My javascript object looks something like: Upon some events in my code, I would like to reset these values to undefined like below: I use libraries like lodash, however i don’t see any function that would perform this. I know how to do this manually, but I was wondering if there is a “Best practices” way of performing this task.

How can I remove an element from a list, with lodash?

I have an object that looks like this: I have lodash installed in my application for other things. Is there an efficient way to use lodash to delete the entry: {“subTopicId”:2, “number”:32} from the obj object? Or is there a javascript way to do this? Answer As lyyons pointed out in the comments, more idiomatic and lodashy way to do

Advertisement