code: function getId(results) {
    for (var i = 0; i < results.length; i++) {
      for (var j = 0; j < results[i].Hierarchy.length; j++) {
        if (results[i].Hierarchy[j].hasOwnProperty('country_id')) {
          return results[i].Hierarchy[j].country_id;
        }
      }
    }
  }
docs: helper function that gets the id of the first result with a hierarchy country id caveat:  this will produce inconsistent behavior if results have different hierarchy country id values (which shouldn't happen, otherwise it's bad data)  it's safe to assume that at least one result has a hierarchy country id value since the call to `lookupCountryByIdShouldBeCalled` has already confirmed it and this function is called in combination