What JSON property swapping is
Exchange two exact properties without a custom script
A property swap exchanges either the values stored at two paths or their terminal property names. UtilityDock applies the operation atomically wherever both properties exist, while preserving valid JSON and leaving unselected data intact.
Schema migration
Correct reversed fields or exchange schema labels
Swap values that landed in the wrong columns, or exchange two property names when a schema contract was reversed. Nested paths remain supported, and property order is preserved whenever practical.
API compatibility
Align payload samples with an integration contract
Exchange two response fields or their values before testing a downstream client. Missing pairs remain unchanged and are counted; null values are treated as intentional JSON values.
Data transformation
Repair known pairwise mistakes with explicit control
Choose two detected properties, select a swap type, and preview the complete result. UtilityDock never guesses, pattern-matches, or overwrites a conflicting destination name.
Examples
Choose whether the paths or their values should change
| Properties | Swap type | Outcome |
|---|---|---|
givenName ↔ familyName | Values | Names stay; values exchange |
latitude ↔ longitude | Names | Values stay; names exchange |
profile.primary ↔ profile.secondary | Values | Nested values exchange, including null |
Modification utilities
Continue with related UtilityDock JSON workflows
FAQ
Questions about swapping JSON properties
Does UtilityDock upload or store my JSON?
No. Your files never leave your computer. Validation, field discovery, swapping, conflict checks, preview, copying, and download creation all happen locally inside your browser.
Can I swap properties in objects and arrays?
Yes. Version 1 accepts JSON objects and arrays. A root array of objects applies the same selected property pair across each object.
What is the difference between swapping values and names?
A value swap keeps both paths and exchanges their values. A name swap keeps each value in place while exchanging the two terminal property names.
Can I swap nested properties?
Yes. Select exact nested leaf paths. Property-name swaps can exchange names within one object or between different parent objects when no destination conflict exists.
What happens when a property is missing?
The affected object remains unchanged and the missing pair is counted. JSON null is a present value and swaps normally.
How are property-name conflicts handled?
UtilityDock never overwrites an existing destination property. The affected object remains unchanged and the conflict appears in the summary.
Does this tool use patterns or automatic matching?
No. Version 1 swaps only the two exact paths you select. It does not support conditions, regular expressions, expressions, automatic matching, or APIs.