Use Case: Retrieving the Last 5 Items from the Order List

In an e-commerce application, the user wants to see their last 5 purchases.

The Sub Array action is used to display only the last 5 items from an array containing all orders registered in the system.

Scenario flow:

  • The orders array containing all orders is retrieved.
  • The number of orders placed by the user is checked.
  • The Starting Index and Count fields are set to 5.
  • Thanks to the Sub Array action, only the last 5 orders are displayed on the screen.