Currently each element in the the object obtained after a query is stored as the following:
((1L, Decimal('30'), Decimal('17')), (2L, Decimal('29'), Decimal('16')))
I want it in the format:
(("1","30","17"),("2","29","16"))
This is because I have to later create a dict with this using zip()
, then pass it on as a json.
Now of course I can iterate over the entire result, go into each element and str()
it, but then with huge result sets it would be a very big overhead.
Is there a faster, simpler way to achieve this?