Your
var ids = [ '5b3c7db4c079dc17dc75fc26', '5b3c7db4c079dc17dc75fc28' ]
looks like they're either hex string or native MongoDB BSON type ObjectID.
Try this for Meteor's Mongo:
import { Mongo } from 'meteor/mongo';
const ids = [
new Mongo.ObjectID('5b3c7db4c079dc17dc75fc26'),
new Mongo.ObjectID('5b3c7db4c079dc17dc75fc28'),
]
Machines.find({ _id : { $in : ids } }).fetch();
For better syntax, use .map() to get a new array of Mongo.ObjectID type IDs.
import { Mongo } from 'meteor/mongo';
const ids = ['5b3c7db4c079dc17dc75fc26', '5b3c7db4c079dc17dc75fc28', ...];
const mongoIds = ids.map(id => new Mongo.ObjectID(id));
Machines.find({ _id : { $in : mongoIds } }).fetch();
// if ids were ObjectIDs instead of literal strings
const objectIdToMongoIds = ids.map(id => new Mongo.ObjectID(id.toString()));
Machines.find({ _id: { $in: objectIdToMongoIds } });
meteor mongo es6 functional-programming