Answer the question
In order to leave comments, you need to log in
Is it possible to search by an occurrence in a Django JSONField?
Good day! I work with semi-structured data. I use the classic EAV model. But there is no limit to perfection. Found time to try replacing EAV with jsonb in postgresql. I stumbled on the fact that I can’t figure out how to implement a search for an occurrence in a string. Is it possible? If so, how? A Django or pure SQL solution will do. To make it clearer, an example: there is a model
class SomeModel(models.Model):
data = JSONField()
{"name": "Michael", "friend_name": "Sara"}
{"name": "Miranda", "friend_name": "Richard"}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question