hasownproperty in angular 8 code example Example: mongodb hasOwnProperty returns false if ( !(User.local && User.local.password) ) {...}