Questions tagged [json-extract]

This tag is intended for questions dealing with accessing and reading data elements or series in JSON objects and/or representing such data elements or series with transformations.

126 questions
1
vote
1 answer

regex_replace function skips anything coming after a NULL value

In my hive table "ticket_full" I have a json type column named "service_id" that I would like to extract in 3 columns, which is like…
Stella
  • 69
  • 1
  • 10
1
vote
1 answer

Json path extract based on multiple condition which include condition on child as well not working

I want to extract id where holder.parameter="jira-software-users" and "permission"="ADMINISTER_PROJECTS" I am using $.permissions[?(@.holder.parameter=="jira-software-users")]).id or $.permissions[?(@.permission=="ADMINISTER_PROJECTS")].id or by…
Shiv
  • 199
  • 5
  • 16
1
vote
2 answers

MySQL JSON_SEARCH for multiple arguments of nested objects

I have a db-table containing json formated strings: CREATE TABLE `template` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, `TemplateData` longtext NOT NULL, PRIMARY KEY (`Id`) ); INSERT INTO template (Id, TemplateData) VALUES (1, '[]'), (2,…
MIB
  • 337
  • 2
  • 15
1
vote
2 answers

MySQL nested JSON column search and compare to with today's day

I am using MySQL Version 5.7.28. I am having json data like below. CREATE TABLE `week2` ( `id` int(11) NOT NULL AUTO_INCREMENT, `type` smallint(1), `json` text , PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT…
Vishal Tanna
  • 1,165
  • 2
  • 12
  • 36
1
vote
1 answer

mysql JSON_EXTRACT in PHP returning "Array" instead of indexed element's value

Very basic thing I'm probably missing, but I don't get it. I have a table called mus_translated_languages in my db, in which I have a json datatype column (six records), whose value is always in the structure of: ["GERMAN","ENGLISH","FRENCH"] When I…
DevelJoe
  • 856
  • 1
  • 10
  • 24
1
vote
1 answer

reading/searching through JSON data in MariaDB (multiple objects in arrays: deep search - syntax question)

I have this JSON structure in a field in a table in a MariaDB database: table column name: BcDJSON {"placards": [ {"barcode":"???","destination":"???","weight":"???"}, {"barcode":"???","destination":"???","weight":"???"}, …
altruios
  • 986
  • 1
  • 10
  • 29
1
vote
1 answer

how to extract nested json using sqlite json-extract

How could I extract nested json using sqlite json-extract or other sqlite json command ? Here I'd like to extract given_id "invoices": [{ ........ "items": [{ "given_id": "TBC0003B", ... } ] } ] Thanks.
kkk
  • 95
  • 1
  • 2
  • 11
1
vote
1 answer

Extract negative integers from JSON

I am using the json_extract function in PrestoSQL, however, if the key-value pair appears with a negative integer in the value such as {"foo":-12345, "bar": 12345} json_extract(json, '$.foo') will return NULL but json_extract(json, '$.bar') will…
iskandarblue
  • 7,208
  • 15
  • 60
  • 130
1
vote
2 answers

Handle escaping characters in JSON

In one of my web requests, I get Response Body data as…
Dingo
  • 31
  • 1
  • 12
1
vote
0 answers

Json extract - script faills to extract just one of the fields

I have this mmysql query that extracts all of the fields properly, save for the 'code' field, which comes up null throughout in the results. Here is the script I'm using: select id, guid, json_unquote(json_extract(jurisdictions, '$[0].lang')) as…
nkramer52
  • 53
  • 6
1
vote
1 answer

Struggling with path when using JSON_EXTRACT

I have meta data that is stored in mysql with geostamps. I want to extract the lat and long for a specific set of data my for the life of me cant figure out the syntax to specify the level down to the value I need the values seperate so i can use…
1
vote
2 answers

How to extract values out of a array using JSON Extractor in jmeter?

I want to extract below json and use values accordingly. I/p JSON:- { "status": "Success", "message": "User created successfully", "id": [ 131188, 131191 ] } Here I want values of id field. I used JSON Extractor and gave expression…
1
vote
2 answers

Jmeter Json Extractor with multiple conditional - failed

I am trying to create a Json Extractor and it`s being a thought activity. I have this json structure: [ { "reportType":{ "id":3, "nomeTipoRelatorio":"etc etc etc", "descricaoTipoRelatorio":"etc etc etc", …
1
vote
2 answers

JMeter pass JSON response value to next request

I am using JMETER to test a web app. First I perform a http GET request which returns a JSON array such as: [ { "key1": { "subKey": [ 9.120968, 39.255417 ] }, key2 : 1 }, { "key1": …
roschach
  • 8,390
  • 14
  • 74
  • 124
0
votes
2 answers

clickhouse extract several values by same key

I have a string which represent array of jsons like '[{json}, {json}...]' in this jsons I have similar keys like metric: '[{"metric": "", }, {"metric": "", }]'. How can I get all values by key "metric" ? If I will use JsonExtract it will return…
Axel HK
  • 75
  • 2
  • 8
1 2
3
8 9