Questions tagged [jsonpath]

JSONPath provides a method to query JSON structures using a syntax similar to XPath. It should not be mistaken for rest-assured's JsonPath, which is based on Groovy's Gpath implementation. For any inquiries about JSON path expressions in general or DSLs related to JSON path expression, please use the [json-path-expression] tag.

Using Java's JsonPath library to insert an object into another object

Currently utilizing the JayWay JsonPath library for JSON object manipulation. In need of inserting a JSON object into an existing JSON array: ### before { "students": [] } ### after { "students": [{"id": 1, "name&qu ...

Transforming JSON Object to a Different Object using Mule ESB

My current process is as follows: <?xml version="1.0" encoding="UTF-8"?> <mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:db="http://www.mulesoft.org/schema/mule/db" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/trackin ...

Query in JSONPath to retrieve elements in an array depending on a specified key's value

I am working with a JSON Array that contains multiple JSON objects: [ { "s3_uri":"s3://fake-s3-bucket/fact_table/fact_table.csv", "dataset":"fact_table" }, { "s3_uri":"s3://f ...

Leveraging JsonPath to retrieve data without prior knowledge of the key

I have a Json string that looks like the following: "files": { "fileA.c": { "size": 100 }, "fileB.txt": { "size": 200 } } My goal is to extract the names of the files, {"fileA.c","fileB.txt"}, using JsonPath. It& ...

Combining JSON elements using JsonPath (JayWay)

Given a basic json structure: { "Keys": [ {"Format": "A", "Subtype": "A1"}, {"Format": "A", "Subtype": "A2"}, {"Format": "B", "Subtype": "A1"}] } I am looking to create a new output by combining the Format and Subtype values using JsonPath expres ...

Journeying through JSON: Presenting the value alongside its hierarchical parent

I'm completely new to JSON Path, so I'm not sure how complicated this could be, or if it's even possible. The JSON structure I have consists of multiple groups, each containing a set of fields. Both the groups and the fields have their own respective sequ ...

The && symbol in JSONPath: combining conditions efficiently

Here is an example of JSON data taken from the tutorial: { "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", " ...

Retrieving timestamp using JSONPath

I'm having trouble with the jsonpath syntax. I want to retrieve two values from the following json using jsonpath. {"data": { "1664024100": 125, "1664024700": 91, "1664025300": 186, " ...

What is the process of parsing JSON within a Postman workflow?

Here is the JSON data I am working with: { "id": "0001", "type": "models", "name": "model_auto", "paths": { "/api/v1/vehicleModels": { "get": { "summary": "Returns a list of car manufacturers", "description": "Returns a li ...

Exploring JSON objects with nested structures using Jsonpath queries

I have a JSON dataset that I am trying to query for a specific value: http://pastebin.com/Vf59Cf9Q The goal is to locate the description == "chassis" within this path: $.entries..nestedStats.entries..nestedStats.entries.type Unfortunately, I am struggl ...

What is the best way to display the key names of objects using jsonpath?

Currently, I am utilizing nodejs in conjunction with jsonpath. Within my json structure lies: { things:{ books: [ {name: "book1"}, {name: "book2"}, {name: "book3"}, {name: "book4"}, ], movies: [ {name: "movie1"} ...

Obtaining data from JSON using JSON path

Attempting to retrieve the id value tied to an email value from the given JSON data has been a challenge for me: [ {"id":11,"username":"John","address":"London","email":"<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="84eeebece ...

A guide on using JSONPath to parse a JSON object and filter based on a specific string value within an array nested inside the

Below is a sample JSON that I have listed down. I am looking to create a JSONPath that selects elements where the subject includes "Maths". Please note that I am utilizing Goessner's JSONPath with the Newtonsoft library in C#. { "class":{ "type": ...

Retrieve the key name that contains a specific value in JSON data

Currently, I am utilizing the JSONAta library to navigate a complex object. My goal is to extract the keys that meet specific conditions. { "properties": { "WTID": { "pattern": "referen ...

Utilizing Jayway Implementation for Grouping Predicates in JSON Path

Trying to utilize JSONpath for querying my JSON Object. The logical || or && operator is functioning correctly individually. However, when attempting to group predicates together and then perform the logical || or && operations, it appears not to be workin ...

Discovering the key and corresponding value within a JSON object based on a different key-value pair

I am currently working in PostgreSQL and I'm attempting to extract the key (r_dirigeant, r_actionnaire, r_beneficiaire) or generate a text containing all keys when "r_ppe" = "oui" and one of the keys (r_dirigeant, r_actionnaire, r_beneficiaire) is als ...