Using dev tools to Parse event data for use in a template

I’m still new to jinaj2 and templating generally, but have managed to work through some semi complex data to parse out for example, data from a weather entity to provide me with a morning weather update.

This is fine when the data is in entities that I can play with using dev tools.

However, I now want to parse data from a service call that generates an event:-

service: zha_toolkit.zha_devices
data:
  command_data:
    - last_seen
    - available
    - user_given_name
    - lqi
  event_done: zha_devices

I can get the output by listening for the event, but how do I go about using the dev tools template to start working out how to break it apart to extract what I want ?

At the moment, I’m use just using a basic automation to prove I can get some of the values like so:-

alias: Event Test
description: ""
trigger:
  - platform: event
    event_type: zha_devices
condition: []
action:
  - device_id: a47f7db07a4a9a7634ac807ab9d12457
    domain: mobile_app
    type: notify
    title: test
    message: "{{trigger.event.data.devices[0].ieee }}"
mode: single

Take a sample value and do something like

{% set x = "sampledata" %}
{{ your template operating on x}}

Thanks @nickrout, I did think about that, but if the value of x is a complex object like so:-

event_type: my_read_success_trigger_event
data:
  zha_toolkit_version: v0.8.28
  zigpy_version: 0.53.0
  zigpy_rf_version: 0.34.6
  ieee_org: null
  ieee: None
  command: zha_devices
  command_data: ieee,lqi,name
  start_time: "2023-01-11T09:51:08.421858+00:00"
  errors: []
  params:
    dir: 0
    tries: 1
    expect_reply: true
    args: []
    event_success: my_read_success_trigger_event
    event_fail: my_read_fail_trigger_event
    event_done: my_read_done_trigger_event
    read_before_write: true
    read_after_write: true
    csvfile: ../web/mycsv.csv
    csvlabel: lqi
  devices:
    - ieee: 84:b4:db:ff:fe:cc:11:ed
      nwk: 0
      manufacturer: Silicon Labs
      model: EZSP
      name: Silicon Labs EZSP
      quirk_applied: false
      quirk_class: bellows.zigbee.device.EZSPCoordinator
      manufacturer_code: 43981
      power_source: Mains
      lqi: 255
      rssi: 0

how do I set that as a variable ?

Taking your example, what would you want to parse? What result do you want to see?

So in this example devices is an array and I want to pull out certain items like lqi