# Perform an aggregation query over the repo.
fun aggregate(pipeline: JsonArray): Array[E] do
var res = new Array[E]
for obj in collection.aggregate(pipeline) do
var instance = deserialize(obj.to_json)
if instance == null then continue
res.add instance
end
return res
end
lib/popcorn/pop_repos.nit:363,2--372,4