How to return data from API as json with list detail instead of ids

Hi there,

I’m looking to return a set of values from an api with a list within.

For now, I have

{
“post”: “A”,
“comments”: [{
“189718727278922x872972897228”
}]

What I’d like to get instead is to return are the comments properties instead of the id.

That would look like this

{
“post”: “A”,
“comments”: [{
“name”: “comment name”,
“author”: “John”
}]

Any guidance on how I could accomplish that?

Thanks a lot