How to flatten select results from query with left joins (one-to-many)?

Is there a way to achieve this? Current behavior in drizzle works like this (assuming we're printing the variable "result" which is supposed to be an array of person with all their hobbies, one to many:

// NOTE: I've read a portion of the docs and it says something like //using a reduce function. I'm looking for a solution that is more // of an abstraction that works out of the box - just like how
// things are when you use a relational query (i.e., findMany)
[
  {
    person: {
      id: "P1",
      name: "Jane Doe"
      ...
    }
    hobby: { id: "H1", ... }
  },
 {
    person: {
      id: "P1",
      name: "Jane Doe"
      ...
    }
    hobby: { id: "H2", ... }
  },
{
    person: {
      id: "P3",
      name: "Bob Smith"
      ...
    }
    hobby: { id: "H5", ... }
  }
]


What I want to achieve is an array wherein these relations are flattened, such as:
[
  {
    "id": "P1",
    "name": "Jane Doe"
    "hobby": [
      { "id": "H1", ...  },
      { "id": "H2", ...  }
    ],
    ...
  },
  {
    "id": "P2",
    "name": "Bob Smith"
    "hobby": [
      { "id": "H5", ...  }
    ],
    ...
  }
]
Was this page helpful?