How to Select Last Item from List/Array?

Hi there!

I want to report how much my portfolio has changed in value. The API returns an array like this:

"profit_loss": [11.8, -3.74, 104.04],

When I try to call it in Bubble I get: 11.8, -3.74, 104.04.

How do I just select the last one and get 104.04?

Hey Jeffrey,

Welcome to Bubble :slight_smile: If you’re dealing with a list, there should be a method called :last item Screen Shot 2020-06-08 at 9.51.52 PM

Hope this helps.

Thank you @jacobgershkovich! I did not see that option before.

I’ll wait to mark this solved…It’s been giving me this error