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
0
votes
0 answers

Need to get the a value from a specific nested json element using MySQL

Answers to a questionnaire are stored in json in a column in this table. I need to pull out the answer to a specific question stored within this column, but am struggling to do so. I want to get the postValue '123456789' as 'Incorporation Number' I…
0
votes
0 answers

loop in json_extract_scalar

The json format I have is in the following form {"0": {...}, "1":{...}, "2":{..}} and this goes for a variable number of integers. I am trying to create a for loop so I can extract all the values at once instead of separately writing a bunch of…
Anika
  • 1
0
votes
0 answers

How can I remove an element from a JSON array using MySQL?

I have a table with JSON data like this: {"entries": [{"color": "blue", "value": 15, "name": "john"}, {"color": "red", "value": 30, "name": "doe"}]} I need to remove the object in the array that has value x. The code I have so far is: SELECT…
shalomew
  • 49
  • 4
0
votes
2 answers

Mysql - Extract json -multiply with one of the attribute

I have json array like [{"name":"MyName","age":10.0},{"name":"yourName","age":20.0}] stored in MySql. Now the task is , I want to multiply by say 2 with all the age attribute, so the result json would…
Raj
  • 1
  • 4
0
votes
0 answers

How to extract tables and images from website's json object?

"table-wrap": { "@id": "ams2322-tbl-0001", "@xml:lang": "en", "@orientation": "portrait", "@position": "float", "label": "Table 1", "caption": { "p":…
0
votes
0 answers

How to Query Nested JSON in Google Big Query

I'm currently having trouble extracting data from a JSON String. The way the data has been pulled, everything has been nested into a single string under the data field name. How it looks like in Big Query: Screenshot of the Schema: Below is an…
0
votes
1 answer

JMeter - Extract value(x-nonce) from the Response Header

[I am unable to get the values of x-nonce from response Header, I have to pass these X-nonce values in next API's, How can I get them and use? ]1
0
votes
1 answer

BigQuery UDF user defined functions return types

I am using the following SQL (from another question) which contains temporary functions. create temp function extract_keys(input string) returns array language js as """ return Object.keys(JSON.parse(input)); """; create temp function …
Tom
  • 33,626
  • 31
  • 85
  • 109
0
votes
0 answers

Unable to access data in Postgres query where clause

I am dealing with the following JSON in a Postgres database column called steps in a table called tCampaign : [ { "name":"Step 1", "stepReference":"01e9f7c0-bc79-11eb-ab6f-2fa1cb676e38", "rewardConditions": [ …
richie
  • 21
  • 2
0
votes
1 answer

Extracting JSON returns null (Presto Athena)

I'm working with SQL Presto in Athena and in a table I have a column named "data.input.additional_risk_data.basket" that has a json like this: [ { "data.input.additional_risk_data.basket.val.brand":null, …
0
votes
2 answers

BigQuery SQL JSON Returning additional rows when current row contains multiple values

I have a table that looks like this keyA | data:{"value":false}} keyB | data:{"value":3}} keyC | data:{"value":{"paid":10,"unpaid":20}}} For keyA,keyB I can easily extract a single value with JSON_EXTRACT_SCALAR, but…
Tom
  • 33,626
  • 31
  • 85
  • 109
0
votes
2 answers

how to use json_extract_path_text?

I am facing an issue with JSON extract using JSON_EXTRACT_PATH_TEXT in redshift I have two separate JSON columns One containing the modems the customer is using and the other one containing the recharge details {"Mnfcr":…
Don_g_ta
  • 30
  • 1
  • 6
0
votes
1 answer

jmeter Json extractor data use as body data

i'm new in jmeter and i found that jmter json extractor can get data from the json respon, i already used the json extractor and i got the json path expression like this my question, can i use the $.key as body data request "temporaryKey"…
Antoni
  • 39
  • 6
0
votes
1 answer

Regex to extract the exact matching string

I want to extract the exact string from the JSON response in Jmeter JSON extractor so below is the sample JSON payload- { "resource":[ { "id":"de04c6b1-a5a3-11ec-a02b-765e38f104a5-19", "name":"Tokyo-1-1-13", …
0
votes
0 answers

Extracting data from array in json data using pyspark

I am new to pyspark and need some help with trying to extract data within an array. The data is from a form like this form imageThe schema is here schema I have managed to extract data till A1, A2, A3. But unable to extract B1, B2, B3. The path to…
ShimsyV
  • 1
  • 1
1 2 3
8 9