JSON Viewer Back to viewer

Transform JSON arrays and objects

Guide · Online JSON Viewer
Last updated: 6 September 2026

Search finds a path; Transform changes the data under that path. In Online JSON Viewer, open Transform on an array or object in the tree to map or reshape items with built-in recipes — or Advanced JS when you need a custom map-style expression.

Per-path Transform

Transform applies at the node you selected, not to the whole document blindly. The result is written back into the JSON at that path, the editor text updates, and you can keep editing or download. Prefer a nested array or object when you only want to reshape one branch.

Recipes vs Advanced JS

Recipes cover common map operations without writing code, for example:

Advanced JS accepts a map-style expression over each item (with item and index). Under the hood it is compiled with new Function and runs in your browser. Only use expressions you understand; do not paste untrusted code. Prefer recipes when they already do the job.

Preview and Revert

Before Apply, Transform shows a short preview of how the first items would look. Review that sample, then apply. If the result is wrong, use Revert last change in the viewer toolbar — the same undo path as inline edits — to restore the previous document snapshot.

Array vs object

Double-click primitives for single-value edits; use Transform when you need a bulk map across children.

Large-array caution

Mapping tens of thousands of items can freeze the tab for a moment while the browser runs the transform and re-serializes JSON. Preview covers only a handful of items; Apply still walks the full array or object. For huge payloads, transform a smaller nested path first, confirm the recipe, then apply higher up — or work on a trimmed copy. Very large results may also prompt for confirmation before applying.

Transform is for reshaping data. To find keys without changing them, see Filter and search JSON. Documents stay in the browser; edit JSON locally explains the privacy boundary.

Related guides

Open JSON Viewer

Privacy Policy