For-each item in JSON array from webhook trigger

I want to send my sensor values via webhooks to Home Assistant. The JSON I want to send is:

	"entity_id": "bedroom_temperature",
	"value": 24.2
	"entity_id": "bedroom_humidity",
	"value": 38.8
	"entity_id": "bedroom_humiture_sensor_battery",
	"value": 14

The question is how do I make the automation loop through the array? (for-each style)

I tried:

  for_each: {{ trigger.json }}
    - service: input_number.set_value
        value: '{{ repeat.item[''value''] }}'
        entity_id: input_number.{{ repeat.item['entity_id'] }}

but I got error: Message malformed: template value should be a string for dictionary value @ data['action'][0]['repeat']['for_each']

Wrap it in quotes otherwise it’s not handled as a Jinja2 template but as a literal string.

  for_each: '{{ trigger.json }}'

Ah, okay. I don’t know why it didn’t come to me just now, but now it seems obvious from the error message.