Array is not iterable

I need to implement an application to upload and manipulate these images. But I got a problem: "x" is not iterable, but transformer returns an array.

const lastUploadFileUrl = {{s3Uploader1.lastUploadedFileUrl}};
if (lastUploadFileUrl != "") {
 return [...{{ selected_hotel.value.images_arr }}, lastUploadFileUrl]; 
} else {
 return {{ selected_hotel.value.images_arr }};
}

Then I will use this transformer in SQL query to update an entry in database.

Are you using the {{transformer.data}} for the results in your next query? What does __var2 look like in that query?