Mongodb – Accessing $map variable in $cond
I have some data in a MongoDB collection that looks something like this: db.test.insertOne( { "interactions": [ { data: "keep", prompt: "prompt 1" }, { other: "keep", prompt: "prompt 2" }, { field: "no prompt" } ]} ) I want…