Currently, I am facing the challenge of reformatting an incoming string from redis before sending it to the client. The original format looks like this...
"[{'user_id': 1, 'username': 'one', 'coins_won': 10}, {'user_id': 2, 'username': 'two', 'coins_won': 20}]"
My goal is to transform the string into an actual array with objects included, such as
[{user_id: 1, 'username': 'one', coins_won: 10}]
Despite trying various methods so far without success, I am still exploring ideas on how to achieve this. Any suggestions?