将国家名称转换为小写

Conver country name to lowercase

我正在尝试获取 Open Weather Map 的国旗图标 API: 示例:http://openweathermap.org/images/flags/br.png

从 api 请求返回的国家代码 json 是大写的, 要获得正确的国家/地区图标,我需要相同的国家/地区代码,但要小写

这是我尝试过的:

<img src="http://openweathermap.org/images/flags/{{lowerCase(weather.sys.country)}}.png">

命令是toLowerCase,它是一个字符串函数。

<img src="http://openweathermap.org/images/flags/{{weather.sys.country.toLowerCase()}}.png">