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에 표현식을 적용해 일치하는 값과 경로를 보여줍니다.
꼭 알아야 할 기본 문법은 무엇인가요?
$는 루트, .key나 ['key']는 속성 접근, ..은 모든 깊이를 재귀적으로 탐색, [*]는 모든 요소, [0,1]은 특정 인덱스, [0:2]는 슬라이스, [?(@.price<10)]은 필터 표현식을 의미합니다.
입력한 JSON 데이터가 어딘가로 업로드되나요?
아닙니다. 표현식 평가는 브라우저의 자바스크립트에서만 이루어지며 서버로 전송되지 않습니다.
점이나 공백이 포함된 키에는 어떻게 접근하나요?
$.user.name 대신 대괄호와 따옴표를 사용한 $['user.name'] 형태로 접근합니다 — 그렇지 않으면 파서가 점을 키 이름의 일부가 아니라 중첩 구분자로 해석합니다.
JSONPath에는 단일한 공식 표준이 있나요?
아닙니다. 기본 문법(점, 대괄호, 별표)은 거의 모든 구현에서 동일하게 지원되지만, 필터와 고급 표현식은 라이브러리마다 다릅니다 — 복잡한 표현식을 사용할 때는 호환성을 확인하세요.