This message was deleted.
s
This message was deleted.
w
Did you try something like:
Copy code
const thing = usernames.apply(names => {
   return names.filter(filterFunction)
}
👀 1
The challenge (and it is a bit maddening as you said) is that usernames is not a
string[]
- it’s an
Output<string[]>
so string methods are not available to it. Therefore, you need to work within the
.apply()
block to strip that
Output
aspect and get the value as a
string[]
and then you can mess with it. In the above,
thing
will be an
Output<string[]>
again but it will contain what you want for later use.
s
Thank you @witty-candle-66007. I thought I understood using
.apply()
but sometimes it just doesn't seem to work the way I hope it will. I appreciate your explanation. It is helpful indeed. I will work with the suggestion you provided and see where I can take it.
274 Views