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
2
votes
1 answer

Is it possible to convert json object into array in JOLT with condition?

I need to wrap my json object into json array and if input is already an array juts leave as it is. Is it possible to do that JOLT ? Thanks for your help in advnace. Scenario 1: Input { "primary": 5, "quality": 4, "design": 5 } Output [ { …
MHegde
  • 329
  • 3
  • 14
2
votes
1 answer

JOLT: Normalize JSON

i am new to JOLT and just can't understand the syntax regarding lists. I have the following JSON: { "Country": [ { "Name": "Angola", "AnimalNames.AnimalName": [ "Aspidelaps lubricus", "Atheris squamigera", …
sjlevel
  • 25
  • 4
2
votes
1 answer

JOLT transformation with two level nested array objects

I want to use Jolt Shift to transform below input to a desire output. The input have two level array nested. Please help me out if you have a solution for this. Thanks in advance. Input: { "P": { "type": "manager", "metadata": { …
2
votes
1 answer

Convert Flat json to Nested Json with multiple arrays using Jolt transform

I'm trying to write a spec to do the below transformation using jolt transformation. I need to convert the flat json to nested Json I am having some trouble with converting the flat JSON to Nested JSON. I have looked at examples and didn't get any…
2
votes
1 answer

JOLT transformation for carrying parent fields to child

I trying to apply JOLT transformation to convert one JSON structure into another. The JOLT spec I came up with does not distribute parent fields to child as I want and is explained in the example below. Could you please help with the mistake I'm…
Albatross
  • 31
  • 3
2
votes
1 answer

How to base64 decode value of dynamic json array in NiFi?

I want to base64 decode encoding string of json array property not using hard code!! This array size is dynamic. Is there the way of decoding value using JoltTransformJson in NiFi? Input JSON { "A": [ { "CC" : "Encoded string", …
Taewoo
  • 31
  • 2
2
votes
1 answer

JOLT transform - Remove empty node in the JSON Array

Can someone help with Jolt spec for the below requirement? Input: { "individuals": [ { "individual": { "LastName": "Ind1-LastName", "firstName": "Ind1-FirstName" } }, { "individual": {} } …
Dhan Raj
  • 29
  • 7
2
votes
2 answers

How can i apply JoltTransformation on the hole json flowfile without splitting it?

The next flow file is an InvoqueHTTP response: [ { "name": "Rolf", "sur_name": "ramsfl" }, { "name": "Jose", "sur_name": "maxim" }, { "name": "Andrei", "sur_name": "alexo" } ] I wanted to use JoltTransformation…
user19031918
2
votes
2 answers

JOLT transformation build array of objects grouping attributes in the same object

I'm trying to construct an array of objects named catalogs with different combinations of input values, but can't set some attributes in the same object. This is the current progress: [ { "operation": "shift", "spec": { "new": { …
2
votes
1 answer

How to replace \n and \" from json value Apache Nifi?

The next record is a json flowfile response from Rest Api, i got it after an InvokeHTTP: { "data": [ { "description": "\n\n\"s, lorem Epsom jdfg\n\"", "offer": "new_one", "state": "save" }, { "description":…
user19031918
2
votes
1 answer

adding default values to an array in JOLT

I need to transform request to a SOLR microservice. Among many other attributes I have a list of fields to be returned from SOLR. I do need to add a couple of default fields there. I.e. with the following input: { "jsonToTransform": { …
Gary Greenberg
  • 1,084
  • 8
  • 14
2
votes
1 answer

Create JSON array with hardcoded keys and values while using value from key using Jolt

I have a situation where I am attempting to take some flat json input and provide some contextual information that is needed for API ingest. In the below example, I am trying to add some hardcoded keys into an array. I've searched quite a bit but…
JPJ
  • 23
  • 3
2
votes
1 answer

Jolt unnest list to top level

I have a JSON: [ { "id": 1015380, "type": "campaign", "stats": [ { "message_sends_by_any_user": 13, "ctr": "0.094", } ] }, { "id": 1015695, "type": "campaign", "stats": [ { …
fujidaon
  • 355
  • 1
  • 6
2
votes
1 answer

Jolt JSON null issue

I have issue with Jolt transformation of JSON\ The input JSON : { "_id": "6218e53465793fa20ea11524", "patientorderitems": [ { "poi_id": "6218e53465793fa20ea1152a", "patientorderlogs": [ { "pol_id":…
Asim
  • 35
  • 4
2
votes
1 answer

JOLT transformation modify overwrite - replace element value in array

I am working on JOLT library to perform a change to the json values. For key-value items I found a solution using "operation": "modify-overwrite-beta" But when it comes to edit values inside the arrays I encounter problems. Let's have for example…
Nadir Bertolasi
  • 527
  • 6
  • 17