bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.56k stars 329 forks source link

How to extract a field from a Java Object in input-Json #1097

Open SampathPalreddy opened 3 years ago

SampathPalreddy commented 3 years ago

Hi Team, I have an InputJson with a Java Object in it. I need to extract a field out of it.

InputJson

{
  "response" :{Response{result=SUCCESS,serverResponse="{"id":"2"}"}}
}

Response is a Java class with attributes result and serverResponse. serverResponse contains json string

ExpectedJson

{
  "id" :"2"
}

Any help is greatly appreciated. :)