200 questions
1
vote
3
answers
111
views
SELECT jsonb data based on specific children values/properties
Assume I have many rows with jsonb data like this in their respective columns:
{
...,
"participants": {
"one_uuid": {
"id": "another_uuid",
&...
0
votes
1
answer
89
views
Handling conditional JsonPath in nested JSONArray
I'm trying to return the value of 'id', where value is "India" in nested JSON as shown below
{
"iterations": [
{
"id": "122",
"parameters&...
0
votes
2
answers
125
views
jayway.jsonpath:json-path is failing to filter objects with !=
I am trying to exclude a field and keeps rest of the fields intact using Goessner JSONPath of com.jayway.jsonpath:json-path:2.9.0 but apparently it is not working.
For the following JSON,
{
"...
0
votes
1
answer
88
views
Filtering list of string with Json Path
I have the following json example
{
"address_components": [
{
"long_name": "43a",
"short_name": "43a",
...
0
votes
1
answer
56
views
Struggling to define JSON Path for an object which can also be an array
I have some JSON data from a third-party and I am using JSON Path to transform the data. Below is a sample of the JSON data and the expressions I am trying.
{
"Traveller": [
{
&...
0
votes
1
answer
62
views
JSON Path Expression Filter Property Filtering on property values in a Single Object
I am using Newtonsoft.Json and the SelectTokens method of the JObject. I am trying to get only the properties that do not have an empty array as it's value. Here is the current code that I am trying ...
2
votes
1
answer
73
views
JsonPath.Net - use query to flatten data structure
Using JsonPath.Net, is it possible to write a single query that will obtain the values of properties with the same key at different nesting levels?
For example, from the following JSON:
{
"ObjA&...
0
votes
1
answer
53
views
jsonpath.net - identify string matches in descendants of dissimilar objects
Considering the following example JSON:
{
"SH1": {
"Locations": [
{
"Downstream Device": [
{
...
0
votes
1
answer
199
views
JSONPath with multiple filter expressions
I have a JSON with the following structure:
{
"markets": {
"US": {
"homes": [
{
"type": "house&...
1
vote
2
answers
221
views
JSON path expression for regex matching property names
{
"PORT" : {
"Ethernet0": {
"id": 0
},
"Ethernet1": {
"id" : 1
},
"Foo": {
&...
0
votes
1
answer
20
views
How do I get a particular array element's value whose position keeps changing using NiFi JsonPath
How do I get a particular array element's value whose position keeps changing using NiFi JsonPath
Input JSON:
{
"phones": [
{
"type": "H",
"...
0
votes
0
answers
38
views
JSON path expression to parse data into a table
i have some data i'm trying to load into a table and im having trouble figuring out the correct path expression to parse it.
sample data:
{"data": {
"2": {
"high": 190,
...
1
vote
1
answer
130
views
get JSON object having specific key including root JSON object
Hi I'm struggling to find the JSONPATH expression to get all the JSON object having a specific key including the root JSON object.
For example:
{
"key1": 1,
"key2": 2,
&...
0
votes
1
answer
66
views
JUnit test using JsonPath start failing after adding Twilio dependency
The question is not about how to convert the response to json, but why did the tests start failing?
The controller returns user information using a Java record object
@PostMapping("/login")
...
0
votes
1
answer
89
views
How to ignore the dynamic value in the JSONPath Expression of SoapUI while only validate against the rest complete payload?
I want to validate the JSON response of all key value pair except the timestamp which is Dynamics. Either I have to write multiple JSONPath Expression assertions or can achieve this in one assertion?
...
0
votes
1
answer
304
views
How to retrieve a specific value using JSONPath with logical OR condition?
I have a JSON structure that may change a key:
{
"status": "ONLINE",
"meter": "A123",
"date": "2024-02-28T14:51:12"
}
OR
{
"...
2
votes
1
answer
86
views
How to accept any key in jsonb path?
I have a jsonb saved in a PostgreSQL database that has the structure:
{
"foo": {
"key0": {
"bar": "myValueA",
},
"key1": {
&...
0
votes
1
answer
288
views
evaluate jsonpath expression for the example
{
"a": [
{
"b": {
"c": [
{
"id": "123"
}
],
"d": {
"e&...
0
votes
1
answer
53
views
Unable to find json path from an array
I am new to JSON. I have a LossHistory Json from which I need to filter "LineOfBusinessCode" equal to "General Liab - Excess" from that I need to show specific "Lossyear"
...
0
votes
1
answer
61
views
How to do JSONPath query using a value in the JSON doc
I have following JSON:
{
"person": {
"id": "5678"
},
"result": {
"accounts": [
{
"id"...
0
votes
1
answer
85
views
How to get value from the json response where a key is dynamic in Jmeter
I want to extract a token from the the given below JSON response where the key of the token is dynamic. The key 57 is dynamic. it change every time. I know that how to extract value by given key but ...
-1
votes
2
answers
99
views
Json Path To extract array element with child Filter
Hi I am looking to construct a jsonpath expression to find the array element that matches the filter on a child.
Please find details below
Json
{
"items": [
{
"id": 1,
...
1
vote
1
answer
2k
views
Combining JsonPath listAt and stringAt to make a single array in AWS Steps/CDK
I am invoking an AWS Steps orchestration - and one of the contained steps is to invoke an ECS Fargate Task.
I currently pass some of the Steps' inputs as the "command" of the ECS Task using ...
0
votes
0
answers
261
views
JSONPath - split object into array of single-member objects
I need to convert a (flat) JSON object to an array of single-member objects:
JSON input:
{
"field1": 123,
"field2": 456,
"fieldN": 789
}
Note that the number of ...
0
votes
1
answer
112
views
JsonPath Conditionals Nested Two Arrays Deep
I'm trying to return the full parent object when the url = 'www.fruits.com'
Below is the json schema. It's quite tricky
{
"produce": [
{
"type": "fruit",
...
-1
votes
1
answer
72
views
Filter query by an element from inner json array
Simple table in PostgreSQL 12.3
create table aaa(id integer, data json);
In data column stores JSON with the following form:
{
"foo": 1,
"persons": [
{
...
1
vote
1
answer
273
views
JsonPath read returns path instead of value
I have a JsonNode with the structure:
{
'field1': 'value1'
'field2': 'value2'
}
I want to retrieve 'value1' by specifying a json path: "$.field1". However, instead of getting 'value1', I'm ...
0
votes
0
answers
261
views
How to append an array (hardcoded way) to a json array with append function
I work on json path and I study the differents functions of this query language.
I tried to use the 'append' function to see how far we can go with it and here's my case :
{
"book": [{
...
0
votes
0
answers
49
views
JsonPath query/expression
How to get values.status value when values.name.value=text from the json.
$.values[?(@.name[?(@.language=='EN' && @.value=='test')])].status
is giving more than 2 status values
{"values&...
2
votes
2
answers
1k
views
parameter inside a jsonpath expression in postgres
How can I use a parameter within a JSONPath expression in a PostgreSQL SQL query?
I want to query something like this:
SELECT * FROM table WHERE jsondata @@ '$.pathto.array[*].** ? (@.someproperty == &...
0
votes
1
answer
162
views
How to extract values from JSON using JSONPath expression
I have data in JSON format and it looks like this:
{
"book": [{
"category": "reference",
"author": "Nigel Rees",
"...
0
votes
1
answer
1k
views
Can I get more than just one key's value with JSONPath?
Here's a simplified (and syntactically not correct, because I stripped it) version of a JSON I'm currently dealing with:
{
"data": {
"134001": {
"id": 134001,
...
0
votes
2
answers
252
views
JSONPath find in list
Let's say I have a JSON like this:
{
"roles": [
"role1",
"role2",
"super_role1",
"super_role2"
]
}
And I want to filter with ...
0
votes
2
answers
297
views
unable to get JSON elements inside nested array using jsonpath syntax
I am trying to get the departments id where location is USA in the following JSON
{
"datapoints": [{
"id": "default.1",
"definedBy": ...
0
votes
1
answer
334
views
In JSONPath, how to find keys matching a 'non existing' filter?
Here is a json snippet containing a definition structure :
{
"Type": "page",
"Label": "Test",
"Children": {
"crud": {
"...
2
votes
0
answers
1k
views
JSONPath - How to get value from specific element of matched array
Let's say I have this JSON:
{
"toplevel": [
{
"testval": "accept",
"number": 1
},
{
"testval&...
0
votes
1
answer
180
views
JSONPath expression to find books having author name
I have the following json:
{
"books": [
{
"id": 1,
"name": "República Brasileira. de Deodoro a Bolsonaro - 2° Edição",
...
0
votes
0
answers
240
views
Cannot use 'in' operator to search for JSONPath Online Evaluator
Cannot use 'in' operator to search for JSONPath Online Evaluator. Can you you please help me why is throwing error message ? Is it syntax error ?
0
votes
1
answer
542
views
How can we get the last element of the filtered json records with json path
The data:
{
token : "xxxx"
files: [
{
id : 1,
deleted: true
},
{
id : 2,
deleted: false
},
{
id : 3,
deleted: false
}
]
}
I ...
1
vote
1
answer
321
views
DEFAULT_PATH_LEAF_TO_NULL in jsonPath not working
JSON
{
"abc": {
"country": [
{
"city": "JODHPUR"
}
]
}
}
JSONPath Configuration
private static final Configuration ...
1
vote
2
answers
384
views
Can I use a jsonpath predicate in a filter?
I have a model with a JSONField and need to select just the objects that have a certain value somewhere nested in the jsonb.
From the Django documentation I understand you can use contains but the ...
0
votes
1
answer
160
views
Not able to filter out a value in jsonPath
I am working on JSONPath where I need to fetch a value for a particular country below is the given JSON.
`
But it is not working.
I am expecting to fetch for a particular country like Canada, United ...
0
votes
1
answer
192
views
Extracting Json response using Json extractor on Jmeter
Is there's a way I could extract the highest id: "15" of bld-appliance-1 using Json Path expression. Currently if use this Json expression "[?(@.name == 'bld-appliance-1')]..id" it ...
0
votes
1
answer
401
views
Option.SUPRESS_EXCEPTION Is not working - JsonPath 2.7.0 (or higher version)
I'm trying to suppress all the exceptions when evaluating a JSON path. but when I upgrade the JSON path lib to 2.7, it seems like it is not working as expected. For example:
var node = objectMapper....
0
votes
1
answer
247
views
How to use multiple fields to evaluate a condition using JSONPath expresstion
I have a json of type:
[{
"event": "click",
"status": "success",
"test": true
}
,
{
"event": "send",
"...
0
votes
1
answer
1k
views
JSON Extract Nested Associative Arrays into Rows in MySQL 8 using JSON_TABLE
I have my data setup in mysql table in a json column that has nested rows with unique key for each child array. I am using MySQL 8 and tried using json_table function but with no success.
Here is the ...
0
votes
1
answer
758
views
Filter and output values in JSONPath Expression that begins with given characters
I have a JSON that structured as below. I am using JSONPath Expression to filter values only. How does one filter and output only those values where the first three characters of those values match ...
0
votes
1
answer
245
views
JAVA JsonPath get selected paths using regex
Given the following Json
{
"id":"MENU_FULL_V2",
"version":"MENU_FULL_V2",
"type":"MAIN",
"icon":"shopping-bag-r&...
1
vote
1
answer
340
views
What counts as an object vs a string in Typescript?
I am creating a Infrastructure-as-Code for a Step Functions Machine. One of these states is of type 'Task' which performs a DynamoUpdateItem on a DynamoDB table.
The code looks as following:
const ...
0
votes
2
answers
1k
views
JSONPath concat arrays and joing
I am trying to use JSONPath expression to extract 2 arrays and concatenate them today to form a long array - and ideally making them unique. However, no syntax I use in the online playground produces ...