Integrations
Configure Task Output
JSONpath in Python Tasks
2 min
this topic contains jsonpath examples examples see the following json document it shows how jsonpath expressions can be added to it ```json { "json response" { "entities" \[ { "id" "email\ android\@android com", "name" "android\@android com", "type" "emailaddress", "count" 12 }, { "id" "email\ creative review\@mopub com", "name" "creative review\@mopub com", "type" "emailaddress", "count" 2 }, { "id" "email\ firebase database client\@google com", "name" "firebase database client\@google com", "type" "emailaddress", "count" 5 }, { "id" "idn\ firebase com", "name" "firebase com", "type" "internetdomainname", "count" 9 }, { "id" "idn\ mopub com", "name" "mopub com", "type" "internetdomainname", "count" 1 }, { "id" "ip 23 2 3 3", "name" "23 2 3 3", "type" "ipaddress", "count" 27 }, { "id" "ip 123 1 1 1", "name" "123 1 1 1", "type" "ipaddress", "count" 2 }, { "id" "ip 123 4 5 6", "name" "123 4 5 6", "type" "ipaddress", "count" 1 } ] } } ``` you can form expressions to suit your requirement using the supported jsonpath syntax and filters expression result $ entire object $ json response entire json response object $ json response entities\[0] first entity $ \['json response']\['entities']\[0] first entity $ json response entities\[0,2] first and third entity $ json response entities\[ 2] first two entities $ json response entities\[ 2 ] last two entities $ json response entities\[ ] name the name of all the entities $ id all the ids $ json response entities\[?(@ count > 6)] all entities with count greater than 6 $ entities\[?(@ type == "internetdomainname")] all entities with type internetdomainname