Suppose I have a document containing an array of embedded documents with the same structure:

```
{
    "_id": ObjectId('5c41c2a3c3238118a0950a7b'),
    "subdocuments": [
        {
            "_id": ObjectId('5c41c2b4c3238118a0950a7c'),
            "field1: "A",
            "field2: "A"
        },
        {
            "_id": ObjectId('5c41c2b6c3238118a0950a7d'),
            "field1: "B",
            "field2: "C"
        }
    ]
}

```

I want to compare `field1` and `field2` within the same subdocument, and project the result inside that subdocument, i.e.:

```
{
    "_id": ObjectId('5c41c2a3c3238118a0950a7b'),
    "subdocuments": [
        {
            "_id": ObjectId('5c41c2b4c3238118a0950a7c'),
            "field1: "A",
            "field2: "A",
            "fields_equal": true
        },
        {
            "_id": ObjectId('5c41c2b6c3238118a0950a7d'),
            "field1: "B",
            "field2: "C",
            "fields_equal": false
        }
    ]
}

```

I would like to do this without needing to unwind `subdocuments`. This does not work:

```
'$addFields': {
    'subdocuments.fields_equal': {
        '$eq': ['$subdocuments.field1','$subdocuments.field2']
    }
}

```

Any ideas on how to do it? Or even if it's possible?