Get value from json

I am trying to get a value from a list where the values don’t have a name. This is a part of the json file

{
"timeSeries": [
        {
            "validTime": "2019-09-30T17:00:00Z",
            "parameters": [
                {
                    "unit": "percent",
                    "values": [44]
                }
             ]
        }
]
}

My value_template looks like this:

{{ states.sensor.smhi_tr.attributes.timeSeries[0].parameters[0].values[0] }}

The problem is that values[0] do not return anything. What am I doing wrong?

values is a method of a dict object. Try this instead:

{{ states.sensor.smhi_tr.attributes.timeSeries[0].parameters[0]['values'][0] }}

You are absolutely right, that works. Thanks!