I have the following django model with a JSONField:
class TestModel(models.Model):
data = JSONField(default={})
And data field with struct bellow:
{
"a": 1,
"b": 2,
}
How ordering queryset by one of the data fields?
TestModel.objects.all().order_by("data__a") # error