By writing a custom method in ActiveQuerySet manager
https://stackoverflow.com/questions/44368818/fetch-json-field-value-using-values-in-django
On Thursday, June 8, 2017 at 4:44:35 PM UTC+5:30, Mallik Sai wrote:
>
> 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.
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/02b2c7e4-d519-4c33-aea8-30285dda9b40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.