django - Unsupported lookup for JSONField or join on the field not permitted
问题 I am having a Json field in my models as - class Product(models.Model): ... detailed_stock = JSONField(load_kwargs={'object_pairs_hook': collections.OrderedDict},default=dict) I am having values in my database like - { "total":0, "5[1]":0 } I am trying to filter objects with total = 0, for that I tried - Product.objects.filter(detailed_stock__total = 0) but it throws error - Unsupported lookup 'total' for JSONField or join on the field not permitted. as per the documentation the following