Last and First Expression in Cloud Flows – Part II
We have already seen how to extract character from string in Cloud flows.
Let see how we can get first and last value in array.
I have array of list of records (account records), want to get 1st value in array.
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-87.png)
Array –
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-88.png)
Add a compose step in flow and use below syntax to get first value.
Syntax- first(<array>)
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-89.png)
Output –
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-90.png)
Similarly, we can get last value in array.
Syntax – last(<array>)
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-91.png)
Output –
![](https://www.cloudfronts.com/wp-content/uploads/2021/03/image-92.png)
Hope this helps !