Show inner objects as columns


Very new to redash and loving it so far.

We have a mongo db and use aggregate function to join collections. The ‘as’ part of the aggregate ‘lookup’ returns an object in a column labelled ‘myJoin’ in the format below


How do I show createdOn and historyId as seperate columns in the table visualization? Am using this as a query currently:

    "collection": "players",
    "aggregate": [
        {"$lookup": {
            "from": "history",
            "localField": "pid",
            "foreignField": "pid",
            "as": "myJoin"
        {"$limit": 10}

Our doc page mentions using fields to control the projection in MongoDB. What happened when you tried this?

‘Fields’ only show the columns which are individually shown in the json response.

The response that we get from the above query is something like this:

_id   |   pid   | ... |   myJoin
234       47              {"_id": 737, "historyId":"s23","createdOn":"2019-11-25","_v":0}

How to show the columns in the myJoin response as seperate columns in the table?