Dynamic sensors from REST json

I have a device which gives sensor states out as following structure. The problem is that ID is not index of array, and array would come every time with different set of various IDs in anything order, so I dont know jsonpath would help here.

{
  "events": [
    {
      "id": 128,
      "status": {
        "current": 70
      }
    },
    {
      "id": 129,
      "status": {
        "uptime": 1915435
      },
    {
      "id": 129,
      "status": {
        "uptime": 1915436
      }
    }
  ]
}

As config I have something like:

sensor:
  - platform: rest
    name: myevents
    json_attributes:
      - status
    resource: https://<myserver>/events
    value_template: "{{ value_json.events }}"
    method: post
  - platform: template
    sensors:
      uptime:
        friendly_name: "Mysensor Uptime"
  # as value  I need here *last uptime value where sensor id = 129* (i.e. 1915436)
        value_template: "{{ state_attr('sensor.myevents', 'uptime') }}"
     ...