Customized Response from "Do a search for"

Hey there :laughing:! This is my first question here, so I’ll try to make the best topic as I can. Here’s my situation:

In my application, I have these three tables:

  • USER
  • PLACE
  • BOOKMARK (with user_id and place_id)

If I “Do a search for” the User’s places, my response is something like this:

{
    "status": "success",
    "response": {
        "bookmarks": [
            {
                "place": "1563476747795x220860111269114000",
                "user": "1563380588785x967402960654187000"
            },
            {
                "place": "1563476747795x220860111269114001",
                "user": "1563380588785x967402960654187000"
            },
        ]
    }
}

But instead of returning these unique_id’s, what I need is to return the place itself, like this:

{
    "status": "success",
    "response": {
        "bookmarks": [
            {
                "place": {
                    "name": "Los Angeles",
                    "country": "EUA"
                }
                "user": {
                    "name": "John",
                    "email": "john@bubble.is"
                }
            },
            {
                "place": {
                    "name": "New York",
                    "country": "EUA"
                }
                "user": {
                    "name": "John",
                    "email": "john@bubble.is"
                }
            }
        ]
    }
}

Is there a way to do it? If so, how?

Thank you for you support so far, guys. U’re the best!