Return first item from array for subitems of array

Hello, Xano! I need help for noobs 🙂

I have a table of products and in API call each product contains a list of photos.
[
   {
      id: 2,
      name: name,
      photos: [
      {url},
      {url}
      …
]
I want to have only 1 photo (first element of photo array can have ID 0, or 1 if 0 was deleted) instead of list of photos [array] in response of this API call.
How to do this?
Thanks in advance!
Working with APIs
9 replies