address.city names the city field nested inside an address object. A path makes that location explicit, so city-based processing can be separated from the surrounding data flow. section 3.3
Focus on the city path
Define the path as ['address', 'city'], then use a Ramda lens to view that nested value while mapping over people. The extracted cities can be reduced into counts or grouped with groupBy. section 3.3
const countryPath = ['address','city']; const countryLens = R.lens(R.path(cityPath), R.assocPath(cityPath));
Shows the path-array form used to focus on address.city with a Ramda lens. section 3.3
