Django: Get Values from a ListSerializer

I have Serializer like this one:

print(SubFoodSerializer(instance.sub_foods,many=True).food_images)

Inside each sub_food we have some food_images. I want to get access to all food_images of the sub foods The error I get is:

'ListSerializer' object has no attribute 'title'
print(SubFoodSerializer(instance.sub_foods,many=True).food_images)
Back to Top