title: How to group two same values and get value from other field in django, DRF
body: <p>I am struggling with grouping two same field values and displaying their related values in one response.</p>
  <p>models.py:</p>
  <pre><code>class Book(models.Model):
      user = models.ForeignKey(User, on_delete = models.CASCADE, null = True, blank = True)
      image = models.ImageField(default = &quot;Nana.jpg&quot;, upload_to = 'images/', null = True, blank = True)
      title = models.CharField(max_length = 150, unique = True)
      author = models.CharField(max_length = 100)
      category = models.CharField(max_length = 100)
      description = models.TextField(max_length = 5000, null = True, blank = True)
      published_date = models.DateField(null = True, blank = True)
      language = models.CharField(max_length = 100, null = True, blank = True, default = &quot;Not selected&quot;)
      read_book_count = models.IntegerField(default = 0)
  
  
      def __str__(self):
          return self.title
  </code></pre>
  <p>Views.py:</p>
  <pre><code>class BookAuthors(APIView):
  
  def get(self, request):
      author = Book.objects.all()
      serializer = AuthorSerializer(author, many = True)
      return Response(serializer.data)
  </code></pre>
  <p>serializers.py</p>
  <pre><code>class AuthorSerializer(serializers.ModelSerializer):
      class Meta:
          model = Book
          fields = ['title', 'author']
  </code></pre>
  <p>urls.py</p>
  <pre><code>path('library/api/authors/', views.BookAuthors.as_view()),
  </code></pre>
  <p><a href="https://i.stack.imgur.com/VnHKS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VnHKS.png" alt="enter image description here" /></a></p>
  <p>I want to combine author Homer and his two titles in same place not to be separated.</p>