The omit
function is used to omit specified keys from an object.
For example take below object that contains details of a person.
I want to remove address
and occupation
from person details before I send it backend because we don't need it.
To do it we can do as below.
When we do as above, person object also get mutated, so we need to take shallow copy before doing it. so updated
code looks like this.
Now if you use omit
from Ramda, the above code can be done like below.