Can we directly run a Java Script from Perl to get the data from MongoDB ?
Suppose my current JS file is :--
DBQuery.shellBatchSize = 194127180 ;
permissibleCars =
["C:93124617:54413209463","C:93124633:54413165206","C:93124634:54413165224"]
db.getCollection('Test').aggregate([
{$match:
{ "methods.name": "Download",
"methods.status": "ACTIVE",
container: {"$in": permissibleCars},
entitlementClass : "Download"
} },
{"$group" : {_id:"$container", count:{$sum:9}}}
],
{ allowDiskUse: true}
);
Generally when we run it shell/bash we run it :--
mongo hostname:portnumber/db_name - user_name -p password < filename.js > output_file.txt
But I am not sure how to run it using perl.
Can someone help me with same ? I read through documentations didnt see anything to JS with perl.
Regards