Struggling to retrieve the payload from a Home Assistant event

I am struggling to extract the payload from a Home Assistant event. The event comes from a HA integration Meshcore and is multi-purpose hence the additional event_type and the payload can be found 1 level "lower".

event_type: meshcore_raw_event
data:
  event_type: EventType.NEW_CONTACT
  payload:
    public_key: 9f8aa3c6253eae5fad7507b76d5
    type: 2
    flags: 0
    out_path_len: -1
    out_path: ""
    adv_name: WJ Solar
    last_advert: 1772540052
    adv_lat: 52.17269
    adv_lon: 4.42771
    lastmod: 1772537581
  timestamp: 1772540080.2545466
origin: LOCAL
time_fired: "2026-03-03T12:14:40.254561+00:00"
context:
  id: 01KJSSYC3YKBBPZWD96FTBG1SZ
  parent_id: null
  user_id: null

So I only require from the event_type "EventType.NEW_CONTACT" the payload but I think I got stuck with changing the default setting $outputData("eventData").event_type

Perhaps the solution is simple but the syntax is at the moment for me slightly abracadabra.
Hope someone can help me with the proper syntax

If it was Node-red I would use a switch node to only pass messages where msg.data.event_type == "EventType.NEW_CONTACT" and a change node to move msg.data.payload to msg.payload.

Alas things work differently in Home Assistant land.

Try setting the event type only with no data.

Edit: On second thought to isolate the following should do it.