Trim values after forward flash

Advertisements Source JSON: { "accounts": [ { "name": "accounts/189134493", "createTime": "2021-02-08T08:55:53.722Z", "updateTime": "2021-02-08T08:55:53.722Z" }, { "name": "accounts/192303354", "createTime": "2021-03-16T14:22:04.865Z", "updateTime": "2021-03-16T14:22:04.865Z" } ], "nextPageToken": "APDpoXMhpjzh_oJqiqip6upnMH" } Expected: [ { "id": "1891344", "createTime": "2021-02-08T08:55:53.722Z", "updateTime": "2021-02-08T08:55:53.722Z" }, { "id": "1923033", "createTime": "2021-03-16T14:22:04.865Z", "updateTime": "2021-03-16T14:22:04.865Z" } ] I was only able to unnest values from accounts array… Read More Trim values after forward flash

Jolt Transformation: Un-nest object of form "key":{"value":"xyz"} to "key":"value"

Advertisements I need to unwrap JSON objects in order to reduce the nesting of input like [ { "key1": { "value": "abc" }, "key2": { "value": "xyz" } }, { "key1": { "value": "123" }, "key2": { "value": "456" } } ] Instead it can just map straight to the value without the unnecessary object… Read More Jolt Transformation: Un-nest object of form "key":{"value":"xyz"} to "key":"value"

Perform cardinality-Many in JOLT

Advertisements I want to write a Jolt definition using cardinality-Many that can transform object "PO_POD_LN_EVW1" into list and ignore if its already a list. Input JSON : { "PURCHASE_ORDER_DISPATCH": { "MsgData": { "Transaction": { "PSCAMA": { "PUBLISH_RULE_ID": { "IsChanged": "Y" } }, "PO_POD_HDR_EVW1": { "STATE_BILL": "", "CURRENCY_CD": { "IsChanged": "Y", "content": "USD" }, "ADDRESS4_VNDR": "",… Read More Perform cardinality-Many in JOLT

How can I add key and values from one object into each object in an array via jolt

Advertisements I’m using jolt and I have an input object where I would like to take the keys out of one property and insert them into each object of an array in another property: My input: { "jolt_marketplaceMetadata": { "NAN_KEY": 1, "TEMP": 3 }, "jolt_attributes": [ { "name": "HELLO", "yyup": 3 }, { "huh": "please",… Read More How can I add key and values from one object into each object in an array via jolt

Broke nested JSON array with JOLT

Advertisements I’m looking for breaking nested JSON file and try to flat it to fit into a SQL database. Current JSON: { "content": { "failedPerProductLineAndReason": { "Product1": { "Downsizing licenses is not allowed": 1 } } } } Expected outcome: { "ErrorType": "failedPerProductLineAndReason", "product": "Product1", "error": "Downsizing licenses is not allowed", "quantity": 1 } Flat… Read More Broke nested JSON array with JOLT

Renaming Special character key with Jolt transform

Advertisements Please help me write the jolt spec to rename the key with a special character "@". When I place "@" in jolt spec, it is not working. I am getting the below error Error running the Transform. JOLT Chainr encountered an exception constructing Transform className:com.bazaarvoice.jolt.Shiftr at index:0. Invalid key:Company@1 can not have an @… Read More Renaming Special character key with Jolt transform