What does the minus operator do in DataWeave?
What does the minus operator do in DataWeave?
In DataWeave, the minus operator is used to remove items from a list. When applied to an array, it removes the specified elements. This usage aligns with DataWeave's approach to data manipulation where operators are often overloaded to work with collections in addition to their traditional arithmetic roles.
If we apply to array. it will remove element. EX: [1,2,3] - 2 ==> o/p ==>[1,3] If we apply to number, it will decrease by 1. EX: 5-1 ==> o/p ==> 4
removes an iten from an array https://docs.mulesoft.com/dataweave/2.4/dw-operators
page does not exist
hello the letter B is a change in perspective of fellow harry potter enthusiats aka SIRUS my best mate
Looks A&B are correct, but maybe "by one" leads to incorrect? I am not sure. https://docs.mulesoft.com/mule-runtime/4.3/dw-operators 1. For subtraction. 2. Removes a specified element of any supported type from an array.
if I'm not mistaken "- -" will decrease a number value not a single "-"
It is in the reference guide at https://docs.mulesoft.com/mule-runtime/4.3/dw-operators Prepend, Append, and Remove Operators for Arrays section, it isn't used as an arithmetic operator into this scope.
Why is it removes item from list? It could also be decrements by right?
Otherwise response must said that it subtract from other value