MDataKit

JSONata Query & TransformJSONata 查询与转换

Query and reshape JSON with JSONata expressions, list every path, or flatten nested keys.

用 JSONata 表达式查询与重塑 JSON 数据,列出全部数据路径,或把嵌套键扁平化。

What is JSONata Query & Transform?JSONata 查询与转换 是什么?

A JSON reshaping workbench powered by JSONata, the expression language designed for querying structured data. Instead of writing traversal code, you describe the transformation you want — items.{name: name, price: price} — and evaluate it against your data. The tool also lists every path present in a document so you can discover the shape of an unfamiliar payload, and flattens nested objects into dotted keys for logging and spreadsheet imports.

一个用 JSONata 驱动的 JSON 重塑工作台。JSONata 是为结构化数据查询设计的表达式语言——你不用写遍历代码,只要描述想要的转换,例如 items.{name: name, price: price},直接对数据求值即可。工具还会列出文档中出现的所有路径,方便你摸清陌生响应的结构;也能把嵌套对象压平成带点号的键,便于写日志或导入表格。

How to use jsonata query & transform如何使用 JSONata 查询与转换

  1. Paste your JSON into the data box.
  2. Type a JSONata expression, or press Pick path to list the available paths.
  3. Press Evaluate to see the transformed result.
  4. Press Flatten keys when you want dotted-key output instead.
  1. 把 JSON 粘贴进数据框。
  2. 写 JSONata 表达式,或点"提取路径"查看可用路径。
  3. 点"求值"查看转换结果。
  4. 需要点号键输出时点"扁平化键"。

Common uses常见用途

FAQ常见问题

Do I need to know JSONata syntax?需要懂 JSONata 语法吗?

Only the basics. Field access is dot notation, functions wrap the path in parentheses, and {} creates a new object. The Pick path button shows exactly which paths exist in your data, which is usually enough to write the expression you need.

只需要基础。字段访问用点号,函数用括号包住路径,花括号用来构造新对象。"提取路径"按钮会列出数据里实际存在的路径,通常足够你写出需要的表达式。

What is the difference between Pick path and Flatten keys?"提取路径"和"扁平化键"有什么区别?

Pick path lists the paths available for querying, while Flatten keys produces a new object where every leaf value sits under one dotted key. The first helps you write expressions, the second is for exporting.

"提取路径"列出可用于查询的路径;"扁平化键"生成一个新对象,每个叶子值都放在一个点号键下。前者帮你写表达式,后者用于导出。

What happens to a missing field?字段不存在会怎样?

JSONata returns undefined, and the result simply omits that key rather than failing. That makes expressions safe to run against records with inconsistent fields.

JSONata 返回 undefined,结果里直接省略该键而不会报错,这让表达式对字段不统一的记录也很安全。

Is my JSON uploaded?JSON 会上传吗?

No. Evaluation happens locally in the browser.

不会。求值在浏览器本地完成。

Other tools其他工具

📊

Excel ⇄ JSON / CSVExcel ⇄ JSON / CSV

Open an .xlsx or .csv file, preview the sheet, then export it as…

打开 .xlsx 或 .csv 文件预览表格内容,再导出为 JSON、CSV 或…

🧾

CSV Profiler & CleanerCSV 统计与清洗

Profile every column of a CSV — type, empty rate, unique count, …

逐列统计 CSV 的数据类型、空值率、去重数量与最值,并一键去重、排序、导出干净…

🗄️

SQLite Query RunnerSQLite 查询

Load a .sqlite database and run SQL queries against it entirely …

载入 .sqlite 数据库,用 WASM 版 SQLite 引擎在浏览器里执行…

Sister sites友情链接 MonkeyDev dev tools hub工具总站 FreePDFKit PDF toolsPDF 工具集 ImageToolKit image tools图片工具集 AI 咒语库 AI prompt libraryAI 提示词库 DevTools developer toolkit开发工具箱 CalcKit finance calculators财务计算器 OfficeKit office utilities办公工具箱 AIkit AI & machine learningAI 与机器学习 ChartKit diagrams & charts图表与可视化 DocKit markdown & document toolsMarkdown 与文档工具