A Set Variable component saves the current payload to a variable.
What is the DataWeave parent expression to access the variable?
A Set Variable component saves the current payload to a variable.
What is the DataWeave parent expression to access the variable?
To access a variable in DataWeave, you use the 'vars' keyword. The syntax to access a specific variable would be #[vars.variableName]. This is the standard way to refer to variables set in a Mule event.
https://docs.mulesoft.com/dataweave/2.4/dataweave-variables-context vars All variables currently set on the current Mule event being processed. Fields: No fields. Example: #[vars.myVar] returns the value of myVar.
#[vars.{nameOfVaraible}] Example: #[vars.myVar] => returns the value of myVar.
vars is correct
B is correct
it is B. Vars
vars. letter b
Try it out in Studio :) It's vars, so "B"
OPTION "B" IS CORRECT.
Mule4 -> vars
https://docs.mulesoft.com/dataweave/2.4/dataweave-variables
var in that case is a reserved keyword from JAVA