JSONpath Visualizer

GET https://randomuser.me/api/?results=5

JSONpath Visualizer

For this example, we'll be using Randomuser API - This is an API that returns random user data and is perfect for demonstrating the power of JSONpath.

Once the request has been made and the response body has been returned, switch to the Visualize tab to start using the tool.

You will be presented with an Input Field to start adding your JSONPath expressions to start filtering the data. The queries will be evaluated in realtime and the filtered data will be presented once a valid query has been made.

JSONpath Visualization Tool

As its evaluated in realtime, there will be parsing errors, these are expected and will be logged to the Visualizer console as info messages. If you also wanted see these as you enter your queries, there is a checkbox available that will display them above the filtered data.

JSONpath Visualization Tool Errors

Filtering the response data

Here are a few basic JSONPath queries that can be used against the Randomuser API:

  • $..results.length
  • $..name.first
  • $..results[*].dob

The queries above are quite simple but JSONPath gives you the ability to use a number of conditional methods, in the queries, to display the data in a number of different ways.

JSONPath ExpressionWhat's it doing
$..results[?(@.gender == 'female')]Gets all the female entries in the results array
$..results[?(@.dob.age <= 35)]Gets any entries that are aged 35 or lower
$..results[?(@.name.title == 'Mr')]Gets all the entries with the title Mr

Further jsonpath instructions

A full list of the commands and expressions that can be used are listed here.

Request Params

KeyDatatypeRequiredDescription
resultsnumber

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;results&quot;:[{&quot;gender&quot;:&quot;male&quot;,&quot;name&quot;:{&quot;title&quot;:&quot;Mr&quot;,&quot;first&quot;:&quot;Mehmet&quot;,&quot;last&quot;:&quot;Erginsoy&quot;},&quot;location&quot;:{&quot;street&quot;:{&quot;number&quot;:8914,&quot;name&quot;:&quot;Şehitler Cd&quot;},&quot;city&quot;:&quot;Eskişehir&quot;,&quot;state&quot;:&quot;Uşak&quot;,&quot;country&quot;:&quot;Turkey&quot;,&quot;postcode&quot;:74105,&quot;coordinates&quot;:{&quot;latitude&quot;:&quot;76.9881&quot;,&quot;longitude&quot;:&quot;-13.4206&quot;},&quot;timezone&quot;:{&quot;offset&quot;:&quot;+4:00&quot;,&quot;description&quot;:&quot;Abu Dhabi, Muscat, Baku, Tbilisi&quot;}},&quot;email&quot;:&quot;mehmet.erginsoy@example.com&quot;,&quot;login&quot;:{&quot;uuid&quot;:&quot;a5ae55cb-172e-49b2-a4e3-4dd97eaad533&quot;,&quot;username&quot;:&quot;whiteduck372&quot;,&quot;password&quot;:&quot;dipper&quot;,&quot;salt&quot;:&quot;fBi6KUkA&quot;,&quot;md5&quot;:&quot;52f92b903b557d995fd038a857b6942f&quot;,&quot;sha1&quot;:&quot;8160e2d3ce665f149877df72383daeb63812cf15&quot;,&quot;sha256&quot;:&quot;44a317325212486ba705130161429717690cd2dd774357fb195d3a6f8ea256d9&quot;},&quot;dob&quot;:{&quot;date&quot;:&quot;1990-03-29T20:59:17.361Z&quot;,&quot;age&quot;:29},&quot;registered&quot;:{&quot;date&quot;:&quot;2016-08-30T08:40:14.406Z&quot;,&quot;age&quot;:3},&quot;phone&quot;:&quot;(496)-683-2212&quot;,&quot;cell&quot;:&quot;(405)-189-9732&quot;,&quot;id&quot;:{&quot;name&quot;:&quot;&quot;,&quot;value&quot;:null},&quot;picture&quot;:{&quot;large&quot;:&quot;https://randomuser.me/api/portraits/men/59.jpg&quot;,&quot;medium&quot;:&quot;https://randomuser.me/api/portraits/med/men/59.jpg&quot;,&quot;thumbnail&quot;:&quot;https://randomuser.me/api/portraits/thumb/men/59.jpg&quot;},&quot;nat&quot;:&quot;TR&quot;},{&quot;gender&quot;:&quot;female&quot;,&quot;name&quot;:{&quot;title&quot;:&quot;Mrs&quot;,&quot;first&quot;:&quot;Leanne&quot;,&quot;last&quot;:&quot;Kowalski&quot;},&quot;location&quot;:{&quot;street&quot;:{&quot;number&quot;:1262,&quot;name&quot;:&quot;Lake of Bays Road&quot;},&quot;city&quot;:&quot;Minto&quot;,&quot;state&quot;:&quot;Nunavut&quot;,&quot;country&quot;:&quot;Canada&quot;,&quot;postcode&quot;:&quot;G8B 2T2&quot;,&quot;coordinates&quot;:{&quot;latitude&quot;:&quot;-67.3676&quot;,&quot;longitude&quot;:&quot;-76.6779&quot;},&quot;timezone&quot;:{&quot;offset&quot;:&quot;-10:00&quot;,&quot;description&quot;:&quot;Hawaii&quot;}},&quot;email&quot;:&quot;leanne.kowalski@example.com&quot;,&quot;login&quot;:{&quot;uuid&quot;:&quot;6082defb-4429-4a77-9299-980537a10e06&quot;,&quot;username&quot;:&quot;greenswan106&quot;,&quot;password&quot;:&quot;383838&quot;,&quot;salt&quot;:&quot;cwmCMgb5&quot;,&quot;md5&quot;:&quot;bd20b076573fd7bab1d810c91103b19c&quot;,&quot;sha1&quot;:&quot;7adf2c87e8f916c5f97a22a7c6e3f6351385f340&quot;,&quot;sha256&quot;:&quot;293a652f42f6c3cd6ad8ef4eee748b37455f85b5d4374d4bbd0ee16efdc81210&quot;},&quot;dob&quot;:{&quot;date&quot;:&quot;1985-11-12T07:42:47.771Z&quot;,&quot;age&quot;:34},&quot;registered&quot;:{&quot;date&quot;:&quot;2012-07-29T09:39:49.701Z&quot;,&quot;age&quot;:7},&quot;phone&quot;:&quot;327-775-3620&quot;,&quot;cell&quot;:&quot;631-548-4287&quot;,&quot;id&quot;:{&quot;name&quot;:&quot;&quot;,&quot;value&quot;:null},&quot;picture&quot;:{&quot;large&quot;:&quot;https://randomuser.me/api/portraits/women/0.jpg&quot;,&quot;medium&quot;:&quot;https://randomuser.me/api/portraits/med/women/0.jpg&quot;,&quot;thumbnail&quot;:&quot;https://randomuser.me/api/portraits/thumb/women/0.jpg&quot;},&quot;nat&quot;:&quot;CA&quot;},{&quot;gender&quot;:&quot;female&quot;,&quot;name&quot;:{&quot;title&quot;:&quot;Mrs&quot;,&quot;first&quot;:&quot;Olivia&quot;,&quot;last&quot;:&quot;Larsen&quot;},&quot;location&quot;:{&quot;street&quot;:{&quot;number&quot;:970,&quot;name&quot;:&quot;Klitvej&quot;},&quot;city&quot;:&quot;Vipperød&quot;,&quot;state&quot;:&quot;Hovedstaden&quot;,&quot;country&quot;:&quot;Denmark&quot;,&quot;postcode&quot;:51991,&quot;coordinates&quot;:{&quot;latitude&quot;:&quot;66.7954&quot;,&quot;longitude&quot;:&quot;-177.5499&quot;},&quot;timezone&quot;:{&quot;offset&quot;:&quot;+4:00&quot;,&quot;description&quot;:&quot;Abu Dhabi, Muscat, Baku, Tbilisi&quot;}},&quot;email&quot;:&quot;olivia.larsen@example.com&quot;,&quot;login&quot;:{&quot;uuid&quot;:&quot;c9054ccb-8593-4195-a87c-74db3e03c34f&quot;,&quot;username&quot;:&quot;happycat286&quot;,&quot;password&quot;:&quot;leader&quot;,&quot;salt&quot;:&quot;2VpzjoNa&quot;,&quot;md5&quot;:&quot;4361b4063f208341d177806cb27c1e6a&quot;,&quot;sha1&quot;:&quot;8061da379ec482a4cfe429ef0c8c7b2eca8257c6&quot;,&quot;sha256&quot;:&quot;71f9d0d9605a55cf3b7f0f0118381127c8aaef0269d3d5cf72bc12dd7bcc8d62&quot;},&quot;dob&quot;:{&quot;date&quot;:&quot;1986-05-04T11:11:50.694Z&quot;,&quot;age&quot;:33},&quot;registered&quot;:{&quot;date&quot;:&quot;2016-07-14T23:21:23.968Z&quot;,&quot;age&quot;:3},&quot;phone&quot;:&quot;90487065&quot;,&quot;cell&quot;:&quot;16314531&quot;,&quot;id&quot;:{&quot;name&quot;:&quot;CPR&quot;,&quot;value&quot;:&quot;040586-8449&quot;},&quot;picture&quot;:{&quot;large&quot;:&quot;https://randomuser.me/api/portraits/women/78.jpg&quot;,&quot;medium&quot;:&quot;https://randomuser.me/api/portraits/med/women/78.jpg&quot;,&quot;thumbnail&quot;:&quot;https://randomuser.me/api/portraits/thumb/women/78.jpg&quot;},&quot;nat&quot;:&quot;DK&quot;},{&quot;gender&quot;:&quot;male&quot;,&quot;name&quot;:{&quot;title&quot;:&quot;Mr&quot;,&quot;first&quot;:&quot;Aleksi&quot;,&quot;last&quot;:&quot;Kauppila&quot;},&quot;location&quot;:{&quot;street&quot;:{&quot;number&quot;:716,&quot;name&quot;:&quot;Tehtaankatu&quot;},&quot;city&quot;:&quot;Orivesi&quot;,&quot;state&quot;:&quot;Finland Proper&quot;,&quot;country&quot;:&quot;Finland&quot;,&quot;postcode&quot;:85410,&quot;coordinates&quot;:{&quot;latitude&quot;:&quot;47.7446&quot;,&quot;longitude&quot;:&quot;-18.2149&quot;},&quot;timezone&quot;:{&quot;offset&quot;:&quot;+8:00&quot;,&quot;description&quot;:&quot;Beijing, Perth, Singapore, Hong Kong&quot;}},&quot;email&quot;:&quot;aleksi.kauppila@example.com&quot;,&quot;login&quot;:{&quot;uuid&quot;:&quot;9a16f47d-c462-43a0-8623-cdde17dc1a81&quot;,&quot;username&quot;:&quot;blackleopard647&quot;,&quot;password&quot;:&quot;eatme&quot;,&quot;salt&quot;:&quot;7ki1RSIN&quot;,&quot;md5&quot;:&quot;79a0effb4405c33627a8078c43ef0415&quot;,&quot;sha1&quot;:&quot;9eba1d83d8f9b46afb650c657dd5bbad442fb281&quot;,&quot;sha256&quot;:&quot;1bc5f6881a474ee98f693d25bf0c87a017f54c0821bdbd1bd9f1cdf1741547eb&quot;},&quot;dob&quot;:{&quot;date&quot;:&quot;1983-07-31T23:46:45.064Z&quot;,&quot;age&quot;:36},&quot;registered&quot;:{&quot;date&quot;:&quot;2002-08-21T16:21:06.190Z&quot;,&quot;age&quot;:17},&quot;phone&quot;:&quot;07-501-036&quot;,&quot;cell&quot;:&quot;041-773-81-41&quot;,&quot;id&quot;:{&quot;name&quot;:&quot;HETU&quot;,&quot;value&quot;:&quot;NaNNA727undefined&quot;},&quot;picture&quot;:{&quot;large&quot;:&quot;https://randomuser.me/api/portraits/men/8.jpg&quot;,&quot;medium&quot;:&quot;https://randomuser.me/api/portraits/med/men/8.jpg&quot;,&quot;thumbnail&quot;:&quot;https://randomuser.me/api/portraits/thumb/men/8.jpg&quot;},&quot;nat&quot;:&quot;FI&quot;},{&quot;gender&quot;:&quot;male&quot;,&quot;name&quot;:{&quot;title&quot;:&quot;Mr&quot;,&quot;first&quot;:&quot;Lorenzo&quot;,&quot;last&quot;:&quot;Guerrero&quot;},&quot;location&quot;:{&quot;street&quot;:{&quot;number&quot;:4553,&quot;name&quot;:&quot;Calle de Arganzuela&quot;},&quot;city&quot;:&quot;Albacete&quot;,&quot;state&quot;:&quot;Andalucía&quot;,&quot;country&quot;:&quot;Spain&quot;,&quot;postcode&quot;:66370,&quot;coordinates&quot;:{&quot;latitude&quot;:&quot;26.8788&quot;,&quot;longitude&quot;:&quot;-66.5230&quot;},&quot;timezone&quot;:{&quot;offset&quot;:&quot;-9:00&quot;,&quot;description&quot;:&quot;Alaska&quot;}},&quot;email&quot;:&quot;lorenzo.guerrero@example.com&quot;,&quot;login&quot;:{&quot;uuid&quot;:&quot;26862c77-f721-44d1-a92d-f22dbb8a5289&quot;,&quot;username&quot;:&quot;brownswan804&quot;,&quot;password&quot;:&quot;chainsaw&quot;,&quot;salt&quot;:&quot;4n87kLJO&quot;,&quot;md5&quot;:&quot;255707721809a71f32094f4dab97bac2&quot;,&quot;sha1&quot;:&quot;8cb6df48ab5d385061ff0c4ef6c5e4edddc555f7&quot;,&quot;sha256&quot;:&quot;8f0a3d2ac7b84d2a76e7ea2c78e4d164bccd35673072f7c66d5f29d7c4594549&quot;},&quot;dob&quot;:{&quot;date&quot;:&quot;1978-01-02T23:45:26.051Z&quot;,&quot;age&quot;:41},&quot;registered&quot;:{&quot;date&quot;:&quot;2008-06-15T15:31:44.324Z&quot;,&quot;age&quot;:11},&quot;phone&quot;:&quot;963-466-282&quot;,&quot;cell&quot;:&quot;677-527-657&quot;,&quot;id&quot;:{&quot;name&quot;:&quot;DNI&quot;,&quot;value&quot;:&quot;34983056-J&quot;},&quot;picture&quot;:{&quot;large&quot;:&quot;https://randomuser.me/api/portraits/men/75.jpg&quot;,&quot;medium&quot;:&quot;https://randomuser.me/api/portraits/med/men/75.jpg&quot;,&quot;thumbnail&quot;:&quot;https://randomuser.me/api/portraits/thumb/men/75.jpg&quot;},&quot;nat&quot;:&quot;ES&quot;}],&quot;info&quot;:{&quot;seed&quot;:&quot;8f43f8dbe4a52951&quot;,&quot;results&quot;:5,&quot;page&quot;:1,&quot;version&quot;:&quot;1.3&quot;}}