I'd be inclined to use
Object.prototype.hasOwnProperty[
^] to determine whether the property has been defined:
var value = objects.find(function(el){ return !el.hasOwnProperty("age"); });
NB: Array.prototype.find[
^] will find the first element which matches. If you want to find all matching elements, use
Array.prototype.filter[
^] instead.
var allValues = objects.filter(function(el){ return !el.hasOwnProperty("age"); });
Note that both functions have limited support in older browsers. There are polyfills available.
If you're only supporting newer browsers - specifically
not Internet Explorer - you might also want to consider using
Arrow functions[
^] to simplify the code:
var value = objects.find(el => !el.hasOwnProperty("age"));
var allValues = objects.filter(el => !el.hasOwnProperty("age"));