Questions tagged [json-path-expression]

A JSON path expression is an expression, possibly in a domain-specific language, specifying a path to to one or more values within a JSON text. The expression may include filters.

Javascript provides a well-known notation for JSON path expressions. JSONPath and JMSEPath are well-known DSLs for JSON path expressions. In jq, any JSON array consisting solely of strings and/or integers can be used as a path expression.

179 questions
0
votes
1 answer

Parse and filter complex JSON Response in Python (the easy compute method)

I have a list of dictionaries (basically JSON Response of an endpoint) I would need to Parse this 16000 lines of json objects and fitler the documents/objects which match criteria that whose leaf element/field : statusInfo/status in not "UP" and of…
Venu S
  • 3,251
  • 1
  • 9
  • 25
0
votes
1 answer

How to extract multiple correlating variables from a JSon

I have to extract multiple correlating variables from a response (which is json) in JMeter. Part of the response is listed below: [ { "data": { "id": "efaa6876-7a8d-4723-9d85-1ed99e822f06", "type": "courses", "attributes": { …
user270219
  • 91
  • 6
0
votes
1 answer

How to stop JSON Path returning object

I'm having an issue with JSONPath work. I have two very similar json objects that I am trying to get values from. Essentially the objects roughly look like this: Object1: {Company: {Organisation: {Official Name: "Name"}} jsonpath1:…
nimgwfc
  • 1,294
  • 1
  • 12
  • 30
0
votes
1 answer

How to exclude fields from selection with jsonPath

I am trying to exclude some fields from Json by jsonPath expression but it doesnt works. I am not able to write properly expression that match just some fields, without excluded. I have tried to use somethink like this $.personal.[?(!@.email)] but…
0
votes
1 answer

Is there a way to return an attribute from a JSON object that is the result of a filtered expression?

If I have the following JSON I would like to know if it is possible to return the value "John" provided the following filter expression $[?(@.firstName="John")] is used to match the desired object. { "firstName": "John", "lastName" : "doe", …
Bob
  • 320
  • 1
  • 3
  • 9
0
votes
2 answers

How to split the multiple json objects present in a json array in Apache NiFi?

Example Input is below: I need to split JSON objects present in a JSON array into individual JSON files using Apache NiFi and publish it to a Kafka Topic. There are multiple JSON objects present in the below array [ { "stops": "1 Stop", …
Meghashyam
  • 53
  • 2
  • 6
0
votes
2 answers

How to get the value of "name" field from the json using jsonpath expression

I want to get the value against "name" field from the below json. I tried using the tools http://jsonpathfinder.com/ and http://jsonpath.com/? I am using http://jsonpath.herokuapp.com/ to verify if the expression path is correct, but it always…
RoyalTiger
  • 511
  • 2
  • 8
  • 27
0
votes
2 answers

Apache Nifi EvaluateJsonPath with Multiple Inputs

I have JSON objects coming into Nifi via MQTT from two different inputs - for instance, let's say one is from a top sensor, and one is from a bottom sensor. Each of the sensors has its own MQTT topic, so I am using two different ConsumeMQTT…
0
votes
1 answer

How to got nth position value from integer array in JsonPath Finder?

I'm trying to get nth position value from an integer array. My Input JSON : { "data" : [ { "status" : "ACTIVE" , "id" : 1 , "isEnabled" : true, "sample" : [ 1, 2, 3, 4 ] } , { "status" :…
Obeth Samuel
  • 590
  • 1
  • 6
  • 18
0
votes
1 answer

JsonPath : Get Parent element after filter

Below is my json document: [ { "line": 1, "elements": [ { "before": [ { "result": { "duration": 1363286, "status": "passed" }, "match": { …
theGeek
  • 101
  • 9
0
votes
1 answer

Use JSONPath to extract nodes from different levels

Given this document: { "k1": "v1", "k2": "v2", "k3": "v3", "k4": { "k4.1": "v4.1", "k4.2": "v4.2", "k4.3": "v4.3" } } I need to extract this subset, in this exact form: { "k2": "v2", "k3": "v3", "k4.1": "v4.1" "k4.2":…
Kevin Pauli
  • 8,577
  • 15
  • 49
  • 70
0
votes
1 answer

How to write json path expressions for the below script in jmeter . Ineed two dynamic values session id and csrf

How to write json path expressions for the below script in jmeter . I need to get the two dynamic values session id and csrf
Riya
  • 529
  • 4
  • 10
  • 18
0
votes
1 answer

How to print jsonpath for json object

I am looking for java API which prints jsonpath for all fields in json object. My 1st part of requirement is like, for given json object (or string) - { "store": { "book": [ { "category": "reference", "author":…
0
votes
1 answer

How can i know the total of elemets using jsonpath expression?

i have the next json structure: [ { "entryDate": "2010-02-25", "nationality": "BR", }, { "entryDate": "2010-02-25", "nationality": "SP", }, { "entryDate": "2010-02-25", …
Carlos Mario
  • 159
  • 1
  • 2
  • 11
0
votes
1 answer

How to add new json node using a java library like Jayway JsonPath

i have a json string say: {"store" : { "book" : [ { "category" : "reference", "author" : "Nigel Rees", "title" : "Sayings of the Century", "display-price" : 8.95 }, { "category" :…
VishalDevgire
  • 4,232
  • 10
  • 33
  • 59
1 2 3
11
12