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

# 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 the list of
differences.

The module is included with Mule runtime. To use it, you must import it to your DataWeave code, for
example, by adding the line `import dw::util::Diff` or `import * from dw::util::Diff` to your
header.

## 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.3/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.3/dw-diff-types)
