Django Rest Framework: Modify Serializer to return dictionary using a field as the key instead of an array of objects

后端 未结 0 1852
情话喂你
情话喂你 2020-11-27 04:53

Currently I have an API View that returns a dictionary that looks like this:

[
    {
        "id": 1,
        "name": "Fly in the sky         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题