Copy as Markdown View as Markdown (opens in new tab) View on GitHub (opens in new tab) Open in... ChatGPT (opens in new tab) Claude (opens in new tab) Perplexity (opens in new tab) toArray toArray(@StreamCapable text: String): Array<String> Splits a String value into an Array of characters. Introduced in DataWeave version 2.4.0. Parameters Name Description text The String value to transform into an Array of characters (a Array<String> type). Example This example shows how toArray behaves with different inputs. Source %dw 2.0 import * from dw::util::Coercions output application/json indent=false --- { a: toArray(""), b: toArray("hola") } Output {"a": [],"b": ["h","o","l","a"]}