TIL... How to delete a property from a javascript object
While working in a reducer, I found I needed to close/remove an entry from a dictionary. After a brief amount of digging I found that I did not have to write this functionality myself. The kind folk of Lodash have you covered. Simple _omit_ the property. Like so:
1 | import omit from 'lodash/omit' |
Lodash/Omit kindly returns a new object, omitting the given key.