Using $match with $in inside a $lookup aggregation pipeline

Hi,
I have a collection of portfolios like:

{"title":String,"isinList":[{"isinNo":String,"weight":Number}], ...}

For the isinNo, I have another collection as product_master. Now I want to do a lookup on product_master to fetch all information for the ISIN like:

[
    {
        '$lookup': {
            'let': {
                'isins': '$isinList.isinNo'
            }, 
            'from': 'product_master', 
            'as': 'instruments', 
            'pipeline': [
                {
                    '$match': {
                        'body.ISIN': {
                            '$in': '$$isins'
                        }
                    }
                }
            ]
        }
    }
]

However here, I am getting an error ‘$in needs an array’. If I do $addField as ‘$isinList.isinNo’, it adds up an array of ISINs.
I am not getting it clear as to where is it going wrong. Thanks in advance for the help.

Read the note about let in the documentation. You need to use $expr.

@Vitthal_Kulkarni, I have provided a link that I think provide you with the solution. Please followup and mark my post as the solution.