How to override the functionality of values()

37 views
Skip to first unread message

Mallik Sai

unread,
Jun 8, 2017, 7:14:35 AM6/8/17
to Django users
I my models I have a JSON Field and I want to get a particular key value from json field in using values().
assume my JOSN Field data is like
   {'key1':value1,'key2':value2,'key3':value3}

eg: MyModel.objects.values( "field1", "field2", "key1(which is present in json field)" )

Is there any way to get json field key value directly or how can I override the functionality of values() method.

Mallik Sai

unread,
Jun 9, 2017, 2:39:31 AM6/9/17
to Django users
Reply all
Reply to author
Forward
0 new messages