Javascript – MongoDB filter list by number or string
This is one doc in my "Assets" collection. { ... category: "categoryName" name: "assetName", weight: 400, ... } I need to filter by "name" or "weight" and this is what I do in NodeJS ...(filter) && { $or: [ {…