Embed presentation
Download to read offline








![Max
• (':array')/(':object') ⇒ ':number'
• Returns the highest number in an array or object.
• %dw 1.0
• %output application/json
• ---
• {
• a: max [1..1000],
• b: max [1, 2, 3],
• d: max [1.5, 2.5, 3.5]
• }](https://image.slidesharecdn.com/basicmathoperationsusingdataweave-161228041156/85/Basic-math-operations-using-dataweave-9-320.jpg)


![Min
• %dw 1.0
• %output application/json
• ---
• {
• a: min [1..1000],
• b: min [1, 2, 3],
• d: min [1.5, 2.5, 3.5]
• }](https://image.slidesharecdn.com/basicmathoperationsusingdataweave-161228041156/85/Basic-math-operations-using-dataweave-12-320.jpg)






This document demonstrates how to perform basic math operations like addition, subtraction, multiplication, division, finding maximum and minimum values, rounding, and square root functions using DataWeave. It provides code examples for each operation, showing how to transform and output the results in JSON or XML format.








![Max
• (':array')/(':object') ⇒ ':number'
• Returns the highest number in an array or object.
• %dw 1.0
• %output application/json
• ---
• {
• a: max [1..1000],
• b: max [1, 2, 3],
• d: max [1.5, 2.5, 3.5]
• }](https://image.slidesharecdn.com/basicmathoperationsusingdataweave-161228041156/85/Basic-math-operations-using-dataweave-9-320.jpg)


![Min
• %dw 1.0
• %output application/json
• ---
• {
• a: min [1..1000],
• b: min [1, 2, 3],
• d: min [1.5, 2.5, 3.5]
• }](https://image.slidesharecdn.com/basicmathoperationsusingdataweave-161228041156/85/Basic-math-operations-using-dataweave-12-320.jpg)




