So I have this function looping in a nested object and returning the first item that satisfies the innermost condition. So in the end we would only have one (or None) object that gets returned. I tried using nested `find` but ended up getting the original payload. So I ended using the nested `for` loop approach shown below.

```
const getMostGranular = (facets) => {
  for (let facet of facets) {
    for (let item of facet.hits) {
      if (getMonthsFromNow(item._source.publish_date) <= 6) {
        return item._source;
      }
    }
  }
};

```

Is there a more "functional" approach that would not look as ugly?