playMaker

Author Topic: How to get the last Array object? [SOLVED]  (Read 919 times)

Silicon Power

  • Full Member
  • ***
  • Posts: 186
How to get the last Array object? [SOLVED]
« on: December 14, 2019, 04:31:06 PM »
Hi. I want to get the last object of an array! is there any action or a good way to do this? Thanks.
« Last Edit: December 16, 2019, 02:23:33 AM by jeanfabre »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: How to get the last Array object?
« Reply #1 on: December 16, 2019, 02:23:24 AM »
Hi,

 Youc an do this by getting the length of the array, substract 1 ( since array indexing is zero based) and then use ArrayGet action.

 But I just made a custom action ArrayGetLastItem, you can get it on the ecosystem :)

 Bye,

 Jean