Using if to select parts of json?

yeah I figured that part out :smiley:
I made one like this to fetch the description

- platform: rest
  resource: https://opendata-download-warnings.smhi.se/api/version/2/alerts.json
  name: "SMHI Warning - description"
  value_template: >-
    {% set areaDesc = '034' %}
    {% set alert = value_json['alert'] | selectattr('info.area.areaDesc','eq',areaDesc) | list | first %}
    {{ alert.info.description }}

but even the description is more then it can handle since it’s 294 characters!

I read here (Need help storing URL for use in generic IP camera (over 255 chars)) the suggestion to use json_attributes since they can handle more then 255 chars