This can be handled in a serializer, should be quite straightforward for this particular case. But it’ll get more involved if you need model relationships, etc.
This can be handled in a serializer, should be quite straightforward for this particular case. But it’ll get more involved if you need model relationships, etc.