Showing more options in lookup field in COQL

Showing more options in lookup field in COQL

When using the COQL query with just the lookup field directly (e.g. using "Account_Name" alone), the response json is "unflattened" but only includes the "Account_Name" and "id" fields. Is there a way to specify which columns are wanted in this "unflattened" json object?

For context: I have a module called SubSite that has an Account linked in it. To get information from the associated account using a COQL query, I have been doing the following:

{"select_query": "SELECT Account_Name.Account_Name, Account_Name.id, Account_Name.Currency, [more fields from SubSite here] FROM SubSite WHERE (Name like '[SubSite Id]')"}

As I add more fields from the Account module into this query, I need to add more and more columns which result in a "flat" json response like so:

{
      "AccountName.Account_Name": "Example",
      "AccountName.id": "12345",
      "AccountName.Currency": "USD",
      [More SubSite fields here]
}

In order to deal with this response I need to "unflatten" all of the Account data into one Account object manually, which grows more tedious as more fields from the account field are needed.

Using a query like this:

{"select_query": "SELECT Account_Name,[more SubSite fields] FROM SubSite WHERE (Name like '[SubSite id]')"}

results in only the "Account_Name" and "id" fields like so:

{
      "Account": {
            "Account_Name": "Example",
            "id": "12345"
            // How to add more fields here for ease of deserializing object?
      },
      [more SubSite fields]
}