./prontouso.com
CÔNG CỤ LẬP TRÌNH

Kiểm Tra Truy Vấn JSONPath

Truy vấn và trích xuất các mảng, thuộc tính hoặc giá trị lồng nhau từ tài liệu JSON phức tạp bằng cú pháp JSONPath chuẩn.

Trạng thái công cụChạy trên trình duyệt của bạn
Xem trước

Kết quả

2 match(es).

Cách thức hoạt động

  1. Nhập dữ liệu của bạn

    Điền các giá trị cần thiết, dán văn bản hoặc tải lên tệp bạn muốn xử lý.

  2. Xem kết quả tức thì

    Hầu hết các công cụ cập nhật theo thời gian thực khi bạn nhập liệu; một số công cụ sử dụng một nút hành động duy nhất.

  3. Sử dụng kết quả

    Sao chép, tải xuống hoặc chia sẻ kết quả được tạo — bạn luôn có toàn quyền kiểm soát dữ liệu của mình.

Quyền riêng tư & xử lý dữ liệuChạy cục bộ 100% trên trình duyệt của bạn. Công cụ này không tải dữ liệu của bạn lên máy chủ.

Kiểm Tra Truy Vấn JSONPath là gì?

Experiment with JSONPath selectors and inspect matched values with their paths while working through an API response or fixture.

TÌM HIỂU CÁCH HOẠT ĐỘNG CỦA CÔNG CỤ

How to test JSONPath expressions

Supported selectors

The tester supports root $, dot properties, quoted bracket properties, array indexes, wildcards, recursive property search with $..name, and recursive wildcard search with $..*.

Reading matches

Results are returned as JSON objects containing the matched path and value. This makes it easier to see whether the expression matched the value you expected or a parent object around it.

Useful workflow

  • Start with a broad selector such as $.items[*] or $..price.
  • Narrow one segment at a time until the count matches your expectation.
  • Use bracket notation for property names that contain spaces or punctuation.

Testing notes

The matcher is a focused subset for quick selector checks. Confirm complex production selectors in the library or runtime that will execute them.

Các Câu Hỏi Thường Gặp (FAQ)

Does it support filters like [?(@.price > 10)]?

No. This version does not evaluate filter expressions, slices, unions, or script expressions.

How do I select every value under an object?

Use $..* to collect every descendant value, or $..propertyName to collect every property with a specific name.

Why is my bracket selector failing?

Bracket property selectors need quotes, such as $['user-name']. Unquoted brackets are treated as array indexes or wildcards.

Can it query invalid JSON?

No. The JSON must parse first. Syntax errors are shown before the JSONPath expression is evaluated.

Công Cụ Liên Quan