MongoDB query within JS function

Im using MongoDB query within JS function. The script looks like this: var continous = [‘b’, ‘e’, ‘LBE’]; continous.forEach(e => izracun(e)); function izracun(atr) { var query1 = { “$match”: { [atr]: {“$ne” : -1} } }; var query2 = { “$group”: { “_id”: atr, “avg”: { “$avg”: “$”+[atr] }, “stdev”: { “$stdDevPop”: “$”+[atr] }, “nonMissing”:…

Details