[Answer]-Converting QuerySet to JSON when selecting fields

1👍

Solution: pass by list

city_list = list(Address.objects.values('city').distinct())
jsonData = json.dumps({"cities" : city_list})
👤Manu

Leave a comment