0

I want to transform this:

{
    "key": "MyNamespace.myName", 
    "value": true
}

to

{
  "data": {
    "header": {
      "namespace": "MyNamespace",
      "name": "SetMyName",
      "messageId": "UUIDString"
    },
    "payload": {
      "myName": true
    }
  }
}

A couple of questions here. First, I'm not sure how to split the json value of key, MyNamespace.myName, into two parts, which will be assigned as values of the keys namespace and name, respectively, as part of the shift operation.

Second, I need to transform the case of myName by capitalizing the first letter of the name, so it becomes MyName, before appending it to Set.

What's the best way to do this?

bycfly
  • 341
  • 3
  • 13

1 Answers1

0

Answered here, note it takes multiple steps.

https://github.com/bazaarvoice/jolt/issues/688

Milo S
  • 4,466
  • 1
  • 19
  • 22