{"size": 493, "ext": "js", "max_stars_repo_path": "M121 - The MongoDB Aggregation Framework/Files/lookup_stage.js", "max_stars_repo_name": "ReynerGonzalez/mongodb-university-course", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "M121 - The MongoDB Aggregation Framework/Files/lookup_stage.js", "max_issues_repo_name": "ReynerGonzalez/mongodb-university-course", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "M121 - The MongoDB Aggregation Framework/Files/lookup_stage.js", "max_forks_repo_name": "ReynerGonzalez/mongodb-university-course", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.4761904762, "max_line_length": 77, "alphanum_fraction": 0.6612576065}
// familiarizing with the air_alliances schema
db.air_alliances.findOne()

// familiarizing with the air_airlines schema
db.air_airlines.findOne()

// performing a lookup, joining air_alliances with air_airlines and replacing
// the current airlines information with the new values
db.air_alliances
  .aggregate([
    {
      "$lookup": {
        "from": "air_airlines",
        "localField": "airlines",
        "foreignField": "name",
        "as": "airlines"
      }
    }
  ])
  .pretty()
