Questions tagged [json-value]
77 questions
1
vote
1 answer
Dataweave in Mule - Change value Array of Objects
I get a payload as input in the message transform component. It is an Array with Objcts:
[
{
"enterprise": "Samsung",
"description": "This is the Samsung enterprise",
},
{
"enterprise": "Apple",
…

ozuke
- 13
- 3
0
votes
0 answers
How to build JSON with selected fields from JSON columns in SQL Server keeping fields type
I have JSON like this:
{
"_key": {
"id": "3b8d1ed7-c3ec-32ec-a083-2ddc17152e94",
"rootId": "15c85327-9628-3685-b84a-375b546ba92a",
},
"employeeInfo": {
"idNumber": "3",
"gender": "Male",
"age": 20,
....
},
…

Valeriy K.
- 2,616
- 1
- 30
- 53
0
votes
2 answers
How to build new JSON with JSON_VALUE in SQL Server? Can't set value type
I have JSON like this:
{
"_key": {
"id": "3b8d1ed7-c3ec-32ec-a083-2ddc17152e94",
"rootId": "15c85327-9628-3685-b84a-375b546ba92a",
},
"employeeInfo": {
"idNumber": "3",
"gender": "Male",
"age": 20,
....
},
…

Valeriy K.
- 2,616
- 1
- 30
- 53
0
votes
2 answers
Equivalent of the $[*] jsonpath for SQL Server?
I would like to use a JSON path like $[*].name or $[..].name on a JSON like this one:
[
{"id": 1, "name": "John"},
{"id": 2, "name": "Mary"},
{"id": 3, "name": "Peter"}
]
To get as result:
["John", "Mary", "Peter"]
But when I try…

celsowm
- 846
- 9
- 34
- 59
0
votes
2 answers
JSON query returns data until I search for it
I have a table (code_table) with a lot of different types of records and values. One of the type of records contains a json field (but not all). The following returns the records with json fields:
select code_data from code_table where…

Velocedge
- 1,222
- 1
- 11
- 35
0
votes
0 answers
How to remove a property name of a JSON with @JsonValue without deleting more properties of my object
I try to make a JSON with a 3 propertys, "items", "status" and "id", but if i use @JsonValue, my JSON don't take "status" and "id"; How can i make this, it's possible?
I want My JSON this way without property name "items"
{
[
{
…

LastMazon
- 1
- 1
0
votes
1 answer
Extract first value from a JSON dictionary in SQL Server
I have various translations stored in a JSON dictionary. I extract the values with JSON_VALUE (for that example I use a variable instead of a column. In real life it is a nvarchar(max) table column):
DECLARE @json AS NVARCHAR(200) =…

keen4000
- 3
- 2
0
votes
3 answers
How to fetch nested data using JSON_VALUE when it contains an array of objects
I have a table MYTABLE which has 3 columns as mentioned below.
|id | myclob_column | column3|
It has one column (myclob_column) which is clob data (json). Sample clob data is below.
{
"name" : "Rahul",
"address" : [ {"street" : "100"}, {"street" :…

Surya
- 604
- 1
- 6
- 25
0
votes
0 answers
Need to query and delete json objects from array using sql
I have the following table and json values:
database is 'myusers'
column username column jsonstuff
database is 'myusers'
column username column jsonstuff
user1 {'id' : 'user1', 'phones' : [{'id': 'x678', 'brand' : 'apple'},{'id': 'y123', 'brand' :…

user1660886
- 69
- 1
- 2
- 8
0
votes
1 answer
Fetching object multiple levels in JSON array using JSON_QUERY in MariaDB do not work
I have the following table in a mariadb database
| model_id | model_name |model_json |
then on the field model_json I have the following…
0
votes
2 answers
I want to check if there is a specific key in the json object
I want to check if the JSON object has the key "error". If it has, I want to "continue" the loop, otherwise the program can go to all the loop.
This is the JSON:
[
{
"cenario": {
"origem": "",
"out": "SNC",
…

Lucas Medeiros
- 3
- 2
0
votes
1 answer
How to sort JSON_EXTRACT or JSON_VALUE value in alphanumeric order in sql
SELECT *
FROM config_server_db.configuration_item
where configuration_item.topic_info_id = 96 AND FIND_IN_SET('6f517a22-2df5-4b75-30af-bce2bd7b066a', labels)
order by JSON_VALUE(configuration_item.cfg_value,…

Misbha Afreen
- 11
- 5
0
votes
0 answers
Query to Find and Remove PG Duplicated JSONB Keys and Values
I would like to be able to Update JSONB column values by removing duplicates, and similarities.
JSONB VALUES:
{"Service Types": {"INSURANCE": true, "Insurance": true}}
{"Service Types": {"HOSPITALS": true, "Hospitals": true}}
{"Service…

Guy
- 11
- 1
- 4
0
votes
1 answer
JSON_value function not returning exact value
I was trying extract value in SQL developer from below json but it gives me wrong output
select
json_value('{"ABC": {
"CFF": 90,
"coord": {
"x1": 27.4,
"x2": 31.6,
"y1": 61.4,
"y2": 62.4
},
"value": "\\"
…

Amol
- 429
- 4
- 22
0
votes
1 answer
Is it possible to define enum with same jsonValue() in Dart?
Can I define enum like this?: what is the best way to handle different type values with the same key like this:
enum type{
@JsonValue(0)
@JsonValue(1)
@JsonValue(3)
@JsonValue(9)
@JsonValue(10)
@JsonValue(11)
@JsonValue(12)
add,
…

Sara Ghorbani
- 3
- 1
- 2