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) toBoolean toBoolean(str: String): Boolean Transform a String value into a Boolean value. Introduced in DataWeave version 2.4.0. Parameters Name Description str The String value to transform into a Boolean value. Example This example shows how toBoolean behaves with different inputs. Source %dw 2.0 import * from dw::util::Coercions output application/json --- { a: toBoolean("true"), b: toBoolean("false"), c: toBoolean("FALSE"), d: toBoolean("TrUe") } Output { "a": true, "b": false, "c": false, "d": true }