I have a serialized model that looks something like below:
{
name: "...."
section: [
{
section_name: "..."
group:[
{"group_name": "..."}
]
},
]
}
Is there any way I can pull out group_name under Django Rest Framework such that:
{
name: "...."
section: [
{ section_name: "..."},
]
group_name:[
{ group_name: "..." }
]
}
The reason why I want to do so is such that I can use django filter to filter on group_name.
For some reason, I couldn't seem to make RelatedFilter work under django rest framework filter (third party package: https://github.com/philipn/django-rest-framework-filters/blob/master/rest_framework_filters/filters.py), and am looking a workaround for this.
Would love to hear any better ways to approach this problem.
Thank you in advance!