Home > Net >  Concatenation operation not working in JOLT
Concatenation operation not working in JOLT

Time:12-07

I am trying to concat two string in JOLT. The field in which I want the output is popping up but it's value is not populating.

What I want-

WG_REQ_FIRST_NAME- Sam

WG_REQ_LAST_NAME- Jones

requesterDetails- Sam Jones

Current output-

enter image description here

Input is to long so I have uploaded the input and the jolt spec in Google Drive.

Below is the link- https://drive.google.com/drive/folders/1vvdFBPwaHRVvjttUTQP0jzQlqYlGfjFZ?usp=share_link

CodePudding user response:

You should explicitly mention the tags of the objects rather than the asterisk representation as they might addres multiple nodes such as

{
  "operation": "modify-overwrite-beta",
  "spec": {
    "PURCHASE_ORDER_DISPATCH": {
      "MsgData": {
        "Transaction": {
          "PO_POD_HDR_EVW1": {
            "requestorDetails": "=concat(@(1,WG_REQ_FIRST_NAME),' ',@(1,WG_REQ_LAST_NAME))"
          }
        }
      }
    }
  }
}
  • Related