how can I turn this back into a list after doing t...
# getting-started
o
how can I turn this back into a list after doing the operation in its lambda to each of the items in the list?

https://i.imgur.com/g0mrTBN.jpg

n
I'm not sure what
Single
is, but I suspect you want
map
, not
forEach
(which is terminal).
o
sorry for the late reply
ok I get what you mean
the issue is that you get back a list of items when you map

https://i.imgur.com/sLsqagh.jpg

the list itself doesnt have that extension function, but OrderResponse does
k
maybe you can use something like that
Copy code
[...].getOrders().map { it?.map { it?.asOrder } }
o
aha, i will try
indeed
👍🏻
🤘 1