Building array of 'truthy' rule conditions I'm running a lot of functions to build a mongoDb request. Based on their response (if not falsy) I'm appending the return values to an array ruleConditions[] which is used later.

Currently I'm doing it this way:

//building ruleConditions
var ruleConditions = {$and: []};

var fromConditions = mongoRequestsHelper.getFromConditions(rule.from);
if (fromConditions) ruleConditions.$and.push(fromConditions);

//and 4 similar blocks


Is there any way to avoid unneeded variables creation (carTypesConditions...)?

Calling functions twice like:

if (mongoRequestsHelper.getFromConditions(rule.moversFilter)) ruleConditions.push(mongoRequestsHelper.getFromConditions(rule.moversFilter))


is not a good idea obviously.
First up, you should really be using more modern variable definitions (using let and const instead of var).

As for your conditional processing for the mongoDB clauses, the simpler way to process the data would be to accumulate all the clauses in to a single temporary array, and then filter that array in to the actual query clause. For example, consider:

const clauses = [
    mongoRequestsHelper.getFromConditions(rule.A),
    mongoRequestsHelper.getFromConditions(rule.B),
    mongoRequestsHelper.getFromConditions(rule.C),
    mongoRequestsHelper.getFromConditions(rule.D),
    ......
];

const ruleConditions = {
    // filter out non-truthy clauses
    $and: clauses.filter(clause =&gt; clause)
};