And of course I want to do this code-wise. It\'s not that there isn\'t alternative to this problem I\'m facing, just curious.
There is has method in lodash library for this. It can even check for nested fields.
_.has(object, 'a'); _.has(object, 'a.b');