sprig icon indicating copy to clipboard operation
sprig copied to clipboard

How to convert "a b c" string to json ["a","b","c"]?

Open apiwoni opened this issue 1 year ago • 1 comments

I have been looking into sprig library functions since it is used by Argo Workflows and I am at a loss how to convert simple space-delimited string to JSON array of strings with Sprig library!?

apiwoni avatar Aug 15 '23 01:08 apiwoni

What do you want to do? This seems like a job for

{{ splitList " " .AbcValues | toRawJson}}

kirides avatar Sep 19 '23 09:09 kirides