JSON
JSONPath テスター
実際の JSON データで JSONPath 式をテスト — 見つかった値とそのパスを即座にプレビュー。
$ — ルート · .key / ['key'] — プロパティ · .. — 再帰検索 · [*] — すべての要素 · [0,1] — インデックス · [0:2] — スライス · [?(@.price<10)] — フィルター
—
JSONPath lets you reach into nested JSON values the way XPath does for XML — a compact path string like $.users[0].email instead of manually walking the structure. This tool lets you test an expression against real data and see the result instantly.
How to use it
- Paste JSON data into one field and a JSONPath expression into the other.
- The result shows every matched value along with its exact path, even when there are several matches.
- Use [*] to iterate over every array element, or a filter like [?(@.price > 100)] for conditional selection.
Common uses
- Working out the right JSONPath expression to pull a specific field from an API response before pasting it into code.
- Testing data-transformation or message-routing rules that rely on JSONPath (for example, in AWS Step Functions or an API Gateway).
- Quickly locating a value in a large, deeply nested JSON document without scrolling through it manually.
Things to keep in mind
There's no single official JSONPath standard — the basic syntax (dots, brackets, *) is supported the same way everywhere, but filters and more advanced expressions differ between libraries.
Array indexing in JSONPath starts at zero, like in most programming languages — [0] means the first element.
よくある質問
JSONPathとは何ですか、このツールは何に使えますか?
JSONPathはJSON内の値を選択するための記法で、XMLに対するXPathに近い考え方です。このツールは入力したJSONに式を適用し、一致した値とそのパスを表示します。
覚えておくべき基本構文は何ですか?
$はルート、.キーや['キー']はプロパティへのアクセス、..は任意の深さを再帰的に検索、[*]はすべての要素、[0,1]は特定のインデックス、[0:2]はスライス、[?(@.price<10)]はフィルター式を表します。
入力したJSONデータはどこかにアップロードされますか?
されません。式の評価はブラウザ内のJavaScriptで完結し、サーバーには送信されません。
ドットやスペースを含むキーにはどうアクセスしますか?
引用符付きの角括弧を使います: $.user.name の代わりに $['user.name'] とします。そうしないと、パーサーはドットをキー名の一部ではなくネストの区切り文字として読み取ってしまいます。
JSONPathには唯一の公式標準がありますか?
いいえ。基本構文(ドット・角括弧・アスタリスク)はほぼどこでも同じように動作しますが、フィルターや拡張式はライブラリによって異なります — 複雑な式を使う場合は互換性を確認してください。