Hello community, I have a single string value retu...
# typescript
b
Hello community, I have a single string value returning as a
pulmi.Outuput
, this output is a JSON string I have to split in 3 fields. I tried to use a single
.apply
function from this output and there take the 3 values and assign to external variables but it doesn’t work clearly. I don’t want to call the same
.apply
and the internal
JSON.parse
3 times to have the fields I need, can you suggest a better way to accomplish that from an Output?
e
Something like:
Copy code
x = str.apply(str => /* parse and split */)
// x is now an Output<[str, str, str]>
a = x.apply(x => x[0])
b = x.apply(x => x[1])
c = x.apply(x => x[2])
?