I have a JavaScript code.
db.xxx.aggregate([
{$project: {object:{$first:'$object.array'}, _id:0}}
])
I don't know how to overwrite it by java client.
import org.springframework.data.mongodb.core.MongoTemplate;
...
Aggregation.newAggregation(
Aggregation.project().andExclude("_id").???
)
And where to find the usage?