---
schema_version: "1"
id: 004bd6235eb878579c3bf25de7aaa6e14dad80166200e83bed2b536cc97efde4
title: Diff (dw::util::Diff)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.12/dw-diff.md
canonical_url: https://docs.mulesoft.com/dataweave/2.12/dw-diff
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 207f32a82a7fbd6c3bfee26e4469f1cec464b20eea2c1b1d08c1ce438de99edf
description: MuleSoft Documentation Site
release: "2.12"
latest: false
---
---
product: DataWeave
version: 2.12
---

# Diff (dw::util::Diff)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

This utility module calculates the difference between two values and returns a list of differences.

To use this module, you must import it to your DataWeave code, for example, by adding the line
`import * from dw::util::Diff` to the header of your DataWeave script.

## Functions

<table><colgroup><col> <col></colgroup><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td><p><a href="https://docs.mulesoft.com/dataweave/2.12/dw-diff-functions-diff">diff</a></p></td><td><p>Returns the structural differences between two values.</p></td></tr></tbody></table>

## Types

- [Diff Types](https://docs.mulesoft.com/dataweave/2.12/dw-diff-types)
