Ravenous Part 4 - Categories key/value pair

Why are we supposed to match category with category:business.categories[0].title instead of category:business.categories.title ? In Yelp documentation (https://www.yelp.com/developers/documentation/v3/business), categories is laid out as below. If I call the 1st item in the categories array by using categories[0], wouldn’t I always only get {“alias”:“newamerican”,“title”:“American (New)”} which restricts my options and eliminate french, wine_bars etc.?

"categories": [
      "alias": "newamerican",
      "title": "American (New)"
      "alias": "french",
      "title": "French"
      "alias": "wine_bars",
      "title": "Wine Bars"

Well, you could choose another element other than the first, but does categories have a title property? What do you get if you try to console.log(business.categories.title)?

What if you you arbitrarily decided to use an index other than 0, and the returned array only had 1 element?

You could write code to randomly select an index based on the number of elements in the array if you wanted to, but if the categories are in an order of most applicable to least applicable (I have no idea if that’s the case), you could be using a less applicable value in your final result.