Hello everyone.
In the lab practice there is a wrong solved code. The solved code in the section “Review and Solved Code” is:
db.sightings.aggregate([
{
$sort: {
'location.latitude': -1
}
}, {
$limit: 4
}
])
but in the collection sightings, the field “location” is an array with two elements, “type” and “coordinates”. The location.latitude doesn’t exist.
It is possible to check?
Best regards
Enrico