How do you group by a certain key value

I was wondering if that was what you really wanted ;*)

It looks like the powershell script sorts the list of objects, and just returns the latest one -- is that right? If so, the expression would change to be:

(payload.features^(>properties.expires) {
    properties.event: [$][0]
}).*

Conceptually, it finds all features, sorts them desc by expires, groups by event, and takes the first one from each group. Is this closer to what you need?

1 Like