How to get last item of an array list

Hi!

I have a array of messages (message is an object with some properties), and i need to test in gateway, some prop of the last item of this array.

I Python, is like: some_array[-1].

@Nilson_Rossi you can try something like this.

(list.get(list.size() - 1)).<key>;

Key is the name of the attribute

Hi, can I ask you did you manage to make an array and make it take variables?