I have a working simple shortcode to display a list of cities/countries from a json file (places.json).
The code is as follows:
<ul>
{{ range .Site.Data.places }}
{{ $p := . }}
<li>{{ $p.properties.name }} - <strong>{{ $p.properties.country }}</strong> </li>
{{ end }}
</ul>
I would like to know how to count and display the total number of cities for each given country and the total number of countries
Thank you