I need to de-serialize an array that looks like this [“1”,”2”,”3”]and use it in a loop how can I turn my string array into a k2 useable reference or variable
you can use the Split, inline function.
@Deon this is nice, however It will split like this:
I was actually wondering if there was a way to deserialize these values into some kind of enumerable on k2s sidesince we are passing this array in as a datafield for this workflow
Unfortunately, the workflow variables are simple types (string, bool, number) etc. so it cannot be arrays or complex objects. Any chance you can just pass in “1,2,3” as the start value?
Can you try to remove the ‘[‘ and ‘]’ (first and last character) of the array before using split function ?
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.