If I do a query:
messages = Recipient.objects.filter(user__system_id=user_id).values("message__id","message__subject")
and then
{"data":list(messages)}
jsonify it, I end up with:
"data" : [
{
"message__id" : "2f24d132-4321-4d63-868a-21de6fbc0d44",
"message__subject" : "And look, a new subject."
}
],
Let's assume there are lots of messages.
What's the best way rename the keys? I.e, I'd like "message__id" to be "id".