在django 1.9(使用postgresdb)中,我们使用JSONField(在模型中),其条目如下所示:
**Entry 1**(in a row of that table):
data: {
"key1": "value1",
"key2": "value2",
"key3": "value3",
"key4": "value4"
}
**Entry 2**(in a row of that table):
data: {
"key5": "value4",
"key6": "value2",
"key7": "value2",
"key8": "value4"
}
我想查询值,例如 data__value__contains='value4'
Django 支持“keys”(has_key, has_any_keys, has_keys) 相关查询
查询上述需求的好方法是什么?