How to avoid pxobjclass class property from json message using dataset execute method for step page

We have a requirement to post the updated data from PEGA to kafka in json format, I am using data set execute method to post the clipboard page into kafka topic in json format, but here json contains pxobjclass property along with all the required business fields, so down stream system is asking to remove pxobjclass property from json message which we are posting to kafka topic.

I have tried with REGEX but that is not working, Please find the screenshot for reference.

@VeerendraCh

To remove the ‘pxObjClass’ property from the JSON message before posting it to the Kafka topic you can create a new Data Transform and select JSON as the option instead of Clipboard. Here are the steps you can follow: 1. Create a new Data Transform and select JSON as the option instead of Clipboard. 2. You can map each element one by one and skip the ‘pxObjClass’ in your mapping. 3. Alternatively you can select the auto map checkbox to convert all the properties on the page to JSON automatically. Then in the settings tab you can select the properties to skip such as ‘pxObjClass’ or any other properties that you don’t want in the JSON formed. 4. Call this Data Transform on the context of your page to convert and pass the executionMode as SERIALIZE. The output of this rule would be the jsonData param with the JSON string. This approach should help you remove the ‘pxObjClass’ property from the JSON message before posting it to the Kafka topic.

:warning: This is a GenAI-powered tool. All generated answers require validation against the provided references.

Removing pxObjClass property

@MarijeSchillern Thank you for ypur prompt response on the requirement, I will work on these steps and update. Thank you.