[Answer]-How to get the array consisting of arrays containing the fields from the table row in Django QuerySet API?

1👍

Why don’t you just do

Entry.objects.values_list()

That’s exactly what it does.

0👍

Summarize

If you want to serialize into json each row from table

example:

arr = [ [col1, col2, col3], [col1, col2, col3], [col1, col2, col3] ]

use

Entry.objects.values_list()

and

json.dumps(list(entries))

👤Artur

Leave a comment