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: बिना मैन्युअल पार्सिंग के JSON डेटा खोजना
अक्सर पूछे जाने वाले प्रश्न
JSONPath क्या है और इससे क्या होता है?
JSONPath एक क्वेरी लैंग्वेज है जो JSON डॉक्यूमेंट से वैल्यूज़ निकालने के लिए इस्तेमाल होती है — XML के लिए XPath जैसा ही कॉन्सेप्ट, लेकिन अपने सिंटैक्स के साथ। $ रूट को दर्शाता है, .key या ['key'] प्रॉपर्टी एक्सेस करता है, [*] ऐरे के सभी एलिमेंट्स सिलेक्ट करता है।
क्या सेंसिटिव JSON डेटा टेस्ट करना सुरक्षित है?
हां, एक्सप्रेशन का इवैल्यूएशन पूरी तरह ब्राउज़र में JavaScript से होता है — कुछ भी सर्वर पर नहीं भेजा जाता।
.key और ..key में क्या फ़र्क़ है?
$.store.book सीधे store के नीचे book खोजता है, जबकि $..book (रिकर्सिव सर्च) डॉक्यूमेंट में किसी भी गहराई पर book खोजता है — अगर वह की कई जगह मौजूद है तो उम्मीद से कहीं ज़्यादा रिज़ल्ट मिल सकते हैं।
डॉट या स्पेस वाली कुंजी को कैसे एक्सेस करें?
स्क्वायर ब्रैकेट और कोट्स से: $.user.name की जगह $['user.name'] — वरना पार्सर डॉट को कुंजी के नाम का हिस्सा मानने के बजाय नेस्टिंग का सेपरेटर समझ लेगा।
क्या JSONPath का कोई एक आधिकारिक स्टैंडर्ड है?
नहीं। बुनियादी सिंटैक्स (डॉट, ब्रैकेट, स्टार) लगभग हर जगह एक जैसा सपोर्ट होता है, लेकिन फ़िल्टर और एडवांस्ड एक्सप्रेशन अलग-अलग लाइब्रेरी में अलग होते हैं — जटिल एक्सप्रेशन के लिए कम्पैटिबिलिटी ज़रूर जांच लें।