i have a model and this model have a JSONField
class Book(models.Model):
data = JSONField()
And this field have an array.
data = {
'outlet':[
{'price': 100},
{'price': 200},
{'price': 300}
]}
I want to get min value of outlet price.I've tried use KeyTextTransform and Min func. I can do easily if outlet not an array. But unfortunately i have to work on array in this case.
I want to solve this problem with ORM. If this is impossible, i'll solve this problem with pythonic As a last resort.