have this message in request.
event= [
{'payload':
{
'key': 'eyJ',
'value': '{ApproximateReceiveCount=1, SentTimestamp=193, SequenceNumber=100, MessageGroupId=1d4, SenderId=ARO:5c9, MessageDeduplicationId=c29e, Body={"token":"cb206","method":"P","methodName":"SP","reference":"814","bk":"ST","status":4,"pmt":{"token":"c182","items":[{"number":"1","description":"desc"}],"amount":{"amount":1,"currency":"4"}},"createdAt":"2022-05-01T15:00:10-05:00","updatedAt":"2022-05-01T15:00:10-05:00","expiresAt":"2022-05-01T00:00:00-05:00"}, ApproximateFirstReceiveTimestamp=12}',
'timestamp': 13,
'topic': 'X-hub',
'partition': 1,
'offset': 0,
'headers':
[
{
'key': 'ptj',
'value': 'c3'
},
{
'key': 'tk',
'value': '62'
},
{
'key': 'pp',
'value': 'pc'
},
{
'key': 'ps',
'value': 'completed'
},
{
'key': 'pt',
'value': 'pv'
}
]
}
}
]
i can get event[0]["payload"]["value"] but I need serialize only "body={}".
my problem is "value" contains attributes like "ApproximateReceiveCount=1, ..., body='{}'"
how can I solve it without use replace or extract text?