Extracting data from sensor attributes

I’m trying to extract data from sensor attributes in the Habitica integration. The parts I need are the values for ‘text:’ in this example for the sensor attributes. Is there some way to reference those values with a template? The hexadecimal keys aren’t static. Every new item gets a unique number.

01234567-890a-bcde-f012-34567890abcd:
  group:
    completedBy: {}
    assignedUsers: []
  type: todo
  value: -1
  priority: 1
  created_at: '2023-03-27T21:18:16.956Z'
  text: Task 1
12345678-90ab-cdef-0123-4567890abcde:
  group:
    completedBy: {}
    assignedUsers: []
  type: todo
  value: -1
  priority: 2
  tags: c2eda400-dd94-4d6d-b7f6-fd102934e41b
  created_at: '2023-03-27T21:18:16.956Z'
  text: Task 2

Can you explain more about what you want to do with the values? It should be fairly straightforward, but you’ll have to give a little more detail.

Those long hex strings are the key names in the attributes. All the rest are the values, so each entry has multiple lines for the data. What I want to do is make a card with a list with just the text after 'text: ’ for each list entry. I guess a Markdown card could do it, but I don’t know how to get just the names for the tasks. In the example above, what I’d want in the card is:
Task 1
Task 2

Of course minutes later I figured it out with this:

{% for key, value in states.sensor.habitica_user_todos.attributes.items() %}{% if 'text' in value | string %}{{ value.text }}{% endif %}
{% endfor %}