title: How to get the last element inside array using VTL?
body: <p>I am writing AWS AppSync resolver. Where I do need to get the last element in my array. AWS AppSync supports VTL language.</p>
  
  <p>Example: </p>
  
  <p><code>#set($items=["color", "taste", "shape"])</code></p>
  
  <p><code>#set($result="shape")</code></p>
  
  <p>I am using $array.size() but didn't work. I don't see any option in  Utility Helpers.
  . </p>
  
  <p><code>#set($result=$item[$item.size()-1])</code></p>
  
  <p>Thanks,</p>