You can either use Jolt Transform (or) ReplaceText processors for this case.
As you are having some attributes to the flowfile so use ReplaceText processor

In ReplaceMent Value configure as
{
"projectId": "${projectId}",
"ticketId": "${ticketId}",
"trigger": "${trigger}",
"timestamp": "${timestamp}",
"pivotVersion":"${pivotVersion}",
"pivotType":"${pivotType}",
"todoCount":"${todoCount}",
"pivots[]": {
"*": {
"state": "${state}",
"type": "${type}"
}
}
}
Substitute all the attribute names(${projectId}..etc) with your attribute names.
Use Replacement Strategy as AlwaysReplace
(or)
If you want to use Jolt for this case then
Use default operation to replace your attribute values and prepare json message
Example:
Jolt Specification
[{ "operation": "shift", "spec": { "z":"z" } }, { "operation": "default", "spec": { "projectId": "${projectId}", "ticketId": "${ticketId}", "trigger": "${trigger}", "timestamp": "${timestamp}", "pivotVersion":"${pivotVersion}", "pivotType":"${pivotType}", "todoCount":"${todoCount}", "pivots[]": { "*": { "state": "${state}", "type": "${type}" } } } }]
As i don't have any attribute values, so my output json is having all empty values in it.
Change the spec jolt spec as per your requirements.