The opposite of _.pick; this method creates an object composed of the own and inherited enumerable properties of object that are not omitted.
_.pick
object
The source object.
Optional
The property names to omit, specified individually or in arrays..
Returns the new object.
var object = { 'a': 1, 'b': '2', 'c': 3 };_.omit(object, ['a', 'c']);// => { 'b': '2' } Copy
var object = { 'a': 1, 'b': '2', 'c': 3 };_.omit(object, ['a', 'c']);// => { 'b': '2' }
_.omit
The opposite of
_.pick; this method creates an object composed of the own and inherited enumerable properties ofobjectthat are not omitted.