JSONDiff
This Script is part of the Common Scripts Pack.#
Supported versions
Supported Cortex XSOAR versions: 6.10.0 and later.
Script to Compare JSON Files and Output Differences#
This script compares two JSON files and returns their differences, such as added, removed, or changed fields, in a structured format.
Script Data#
| Name | Description |
|---|---|
| Script Type | python3 |
| Cortex XSOAR Version | 6.1.0 |
Inputs#
| Argument Name | Description |
|---|---|
| old_json | The first JSON object to compare. |
| new_json | The second JSON object to compare. |
Outputs#
| Path | Description | Type |
|---|---|---|
| JSONDiff.changed | List of fields that have changed between the two JSONs. | Array |
| JSONDiff.added | List of fields that were added in the second JSON. | Array |
| JSONDiff.removed | List of fields that were removed from the first JSON. | Array |