xLookupByLabel

Type: function
Returns the object contained in the outer object's children if its label value matches the label argument provided.

Body

function(outer,label){
  if (outer === undefined || !('children' in outer)){
    return undefined;
  } else {
    return _.find(outer.children,function(child){ return 'label' in child && child.label == label; });
  }
}

Classpath

Children