I am trying to get the name of the logging officer into a placeholder (Freshservice does not have such a field!) To do this I am using the Fresh v2 web API. To do this I am doing a GET request to https://sjchh.freshservice.com/api/v2/tickets/{{ticket.id_numeric}}/activities
This is getting the activities fine, and it picks up the name of the agent for each activity under $.activities[*].actor.name
Unfortunately, my plan of getting it out of $.activities[0].actor.name as the first recorded activity doesn’t work because Fresh returns the JSON array in order of last activity to first activity.
Does anyone know how to get the highest indexed activity? So I have six activities, the highest indexed activity would be number five, so I want to access $.activities[5].actor.name