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 -

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

Why does a .NET 4.0 program produce a system.unauthorizedAccess error on a Windows Server 2012 machine with .NET 4.5 installed? -