To django model users. Can you query keys inside a JSON datatype(pgsql)[0] from the ORM? For example in sqla you will do: records = db_session.query(Resource).filter( Resources.data["lastname"].astext == "Doe" ).all() with data being the json column and lastname a key in the column. [0]: https://stackoverflow.com/a/29975187
Django's version of that query (to me) looks a little neater too. records = Resource.objects.filter( data__lastname__exact="Doe" )
Resource.query.filter(
Resources.data["lastname"].astext=="Doe"
)
Personally I find the "__" convension strange and not sure that it would be obvious to new comers that you are accessing a key in the data column.