Forgive me, I’m having a bit of issue trying to get a response variable from a mealie Integration service into a list.
The response variable outputs the following (name of variable is Today):
mealplan:
- mealplan_id: 561
user_id: fdfb4652-daa3-4d91-ac97-a8673c5b0806
group_id: 65082ac2-0329-4859-9515-173c8c3687fe
entry_type: dinner
mealplan_date:
__type: <class 'datetime.date'>
isoformat: '2025-02-08'
title: null
description: null
recipe:
recipe_id: 47b263b1-5d1b-4c19-8057-c3989fdd0fe4
- mealplan_id: 561
user_id: fdfb4652-daa3-4d91-ac97-a8673c5b0806
group_id: 65082ac2-0329-4859-9515-173c8c3687fe
entry_type: dinner
mealplan_date:
__type: <class 'datetime.date'>
isoformat: '2025-02-08'
title: null
description: null
recipe:
recipe_id: 47c263b1-5d1b-4c29-8057-c3989fcd0fe4
I’m looking to parse the output of this variable into a list with only the mealplan.recipe.recipe_id. Below is what I have so far. I can’t seem to get past this point regardless of what I try.
variables:
recipeid: |
{%- for value in Today['mealplan'] %}
{%- for recipe in value['recipe'] %}
{{ recipe }}
{%- endfor %}
{%- endfor %}