I am trying to calculate the min and max for a json array.
This is how I currently use the JSON data.
<div ng-init="hours = $eval(itemState('WeatherHourly_json'));"></div>
How do i get the max and min of hours.temp.metric ?
My JSON looks a bit like this:
"hours": [
{
"temp": {"english": "38", "metric": "3"},
"feelslike": {"english": "33", "metric": "1"},
"pop": "0",
}
,
{
"temp": {"english": "38", "metric": "2"},
"feelslike": {"english": "33", "metric": "0"},
"pop": "0",
}
,