JSON Flatten & Unflatten avatar

JSON Flatten & Unflatten

Pricing

from $0.0025 / json transformed

Go to Apify Store
JSON Flatten & Unflatten

JSON Flatten & Unflatten

Flatten nested JSON into dot-path keys or rebuild nested JSON from flat keys. Perfect for turning deep API data into flat columns for CSV, SQL and BI tools.

Pricing

from $0.0025 / json transformed

Rating

0.0

(0)

Developer

hiper soft

hiper soft

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Flatten nested JSON into dot-path keys β€” or rebuild nested JSON from flat keys. Turn deep API responses and config objects into flat user.address.city columns ready for CSV, SQL and BI tools, or reverse the process to reconstruct nested structures. Every run also saves the full transformed JSON to your storage.

JSON Flatten & Unflatten input β€” configure the options in the Apify Console

What it does

  • Flatten: { "user": { "name": "Ada" } } β†’ { "user.name": "Ada" }.
  • Unflatten: { "user.name": "Ada" } β†’ { "user": { "name": "Ada" } }.
  • Custom key delimiter and optional max depth.
  • Emits one key/value row per path (perfect for CSV/Excel) and the full JSON as a file.

Use cases

  • Data engineering β€” flatten nested JSON before loading into a spreadsheet, SQL table or BI tool.
  • Config management β€” convert between flat env-style keys and nested config.
  • API prep β€” reshape deep responses into flat records.

Input

{ "jsonText": "{ \"user\": { \"name\": \"Ada\", \"address\": { \"city\": \"London\" } } }", "mode": "flatten", "delimiter": "." }
FieldTypeDescription
jsonTextstringThe JSON to transform (as text).
modestringflatten or unflatten.
delimiterstringCharacter joining nested keys. Default ..
maxDepthintegerStop flattening beyond this depth (0 = no limit).

Output

JSON Flatten & Unflatten output β€” the results as a clean dataset

Key/value rows in the dataset, plus the full transformed JSON at result.json in your key-value store.

{ "key": "user.address.city", "value": "London", "resultUrl": "https://api.apify.com/v2/key-value-stores/.../records/result.json" }

Output schema

FieldTypeDescription
keystringFlattened key path (or (result) for unflatten).
valuestringValue at that key.
resultUrlstring (URL)Link to the full transformed JSON file.

FAQ

Can I paste an array? Yes β€” arrays and objects are both supported.

Where's the full result? Saved as result.json in the run's key-value store (link in every row).

Can I automate it? Yes β€” via integrations on the Apify platform and the Apify API.

Notes

Original clean-room implementation.