python - Query by empty JsonField in django -


i need query model jsonfield, want records have empty value ([]):

i used mymodel.objects.filter(myjsonfield=[]) it's not working, returns 0 result though there's records having myjsonfield=[]

try mymodel.objects.filter(myjsonfield='[]').


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -