Why native query is not what mongodb console is?

I can't convert this query to native query. I don't understand how it works

var gteNow={$gte : new Date()}
var userLookup={
    "localField": "shopinfo.user_ids",
    "from": "users",
    "foreignField": "_id",
    "as": "userinfo"
var shopLookup={
    "localField": "shop_id",
    "from": "shops",
    "foreignField": "_id",
    "as": "shopinfo"
     {"$match":{expired_at: gteNow}},
     { "$lookup": shopLookup},
     { "$lookup": userLookup},

Hi @hadifarnoud
Metabase does not support all the functionality of the MongoDB console.
And $lookup is currently not supported:
https://github.com/metabase/metabase/issues/9095 - upvote by clicking :+1: on the first post