Questions tagged [jolt]

A JSON to JSON transformation library written in Java.

Jolt is a to JSON transformation library written in .

For more information, see the GitHub page.

Latest release: 0.1.6 released on Mar 28, 2022

1312 questions
0
votes
1 answer

Jolt transforming to array

I am getting null in my output json. Please find my spec and details below. The input json can have n numbers of COMPINFO . pls suggest my input.json is { "valid": "true", "message": "", "data": { "COMPINFO": [ { …
Pratik Jaiswal
  • 390
  • 1
  • 5
  • 21
0
votes
1 answer

Break down JSON properties to array of objects

I am trying to transform a simple JSon object into an array of objects with keys and values broken out, but I'm not sure how to quite get there. I have tried this a number of ways but the closest I got was to create an object with two arrays,…
davdic
  • 249
  • 3
  • 10
0
votes
1 answer

Jolt generates null values as transformation output and can't be removed

I have this JSON as input: { "BusinessInfo": { "MemberInformation": { "Item": [ { "Relation": { "Item": [ { "Partner1": "0072938063", "Partner2": "0072938064", …
Martinsiyo
  • 73
  • 1
  • 1
  • 6
0
votes
1 answer

jolt transform - mapping flat to hierarchical (Nested

I am trying to map a flat structure to a hierarchical structure using Jolt http://jolt-demo.appspot.com/#andrewkcarter2: My input is a flat structure containing customer details: Below is my JSON Input: [ { "customerId": "100", …
lr-pal
  • 339
  • 2
  • 6
  • 20
0
votes
1 answer

Hard coded value based on the filed name in jolt spec

I am using jolt to convert one json to another json but I am not getting correct output json for given input json Input : { "user":{ "homePhone":"12345678901", "mobilePhone":"12346750983", "email":"test@example.com" …
ppb
  • 2,299
  • 4
  • 43
  • 75
0
votes
2 answers

Jolt transform so that data of an element is the key and the value is another elements data

I need to perform a Jolt transformation on the below example json: [ { "name" : "foo", "dataSample" : "red" }, { "name" : "bar", "dataSample" : "amber" }] I need the output to look like: { "foo": "red", "bar": "amber" } so far i've…
0
votes
1 answer

create a new array using JOLT

I am trying to modify the JSON output using JOLT, I have been using it mostly to rename/remove fields until now. I want to create a new object of existing 2 arrays as elements. input.json [ { "features": [ { "featureId": 1, …
Anusha
  • 647
  • 11
  • 29
0
votes
1 answer

1-1 Mapping (with no unique key identifier) of JSON object in Jolt

I have a list of JSON objects, converted from the result of a SQL query. The JSON looks like this: [ { "CREATE_DATE_TIME" : "2018-02-04 11:00:03.0", "EXTERNAL_ID" : "1111", "CERT_NUMBER" : "123", "DESCRIPTION" : "DESC…
oikonomiyaki
  • 7,691
  • 15
  • 62
  • 101
0
votes
2 answers

Nifi JoltTransformJSON : Keeping the underscore sign in key name

I am trying to write a jolt in Apache Nifi that converts the json form. I managed to convert the jolt but one attribute is missing underscore: Output: { "Source": { //source is missing underscore. It should look like _Source …
Lieberta
  • 147
  • 2
  • 16
0
votes
1 answer

Insert Current Date/Time Using Jolt

Need assistance on trying to insert the current date/time using Jolt. I tried (as shown below) using "${now()}"; but the output is not producing the date/time. JSON input: [ { "ProdId": "Filler", "ProductName": "Z Dry Filler", "Trait":…
Jason Gregory
  • 139
  • 1
  • 16
0
votes
1 answer

Transpose an array to another one with Jolt

I have tried hard to transpose the input json string to another one with Jolt as follows. But I couldn't write the correct Jolt Spec to achieve the transformation, can Jolt do something like this? Thanks! Input: { "result": [ { "name":…
LHCHIN
  • 3,679
  • 2
  • 16
  • 34
0
votes
1 answer

How to add new Items to the array by using jolt spec file in JSON data

I'm facing issue while adding new Items to an Array. I want to add new Items in address array. any help would be appreciate. Thanks in advance: This is my code: input.json { "lines": [ { "movement": { "source": { …
0
votes
1 answer

How to recursively iterate over a tag using jolt

I need to transform JSON using jolt. Input JSON is as follows: { "items": [ { "Group1": { "ABCCode": "3", "ABCDescription": "abcd" }, "Group2": { "test2": [ "123" ] } } …
Dee
  • 31
  • 3
0
votes
1 answer

Find element by id in json

need to transform based on the element value input.json { "Result": { "owner": { "name": "test user" }, "Components": [ { "id": "123-456-789" } ], "123-456-789": { "temp": { "emip":…
0
votes
1 answer

How to use jolt to parse array of array

I want to use jolt to parse the json. But I can't get the age value in the first level successfully. May someone help me? The input json is like this: { "name": "abc", "age": "20", "Photos": [ { "a": "AAA.jpg", "b": "BBB.jpg", …
avseq
  • 23
  • 4