How can I filter by 2 properties instead of only one whe nusing bulkUpdateMany?
Here is my code
//trying to update objects into database or create new ones if not existent
tickersToUpdate.push({
filter: { symbol: temp.symbol.toUpperCase() },
update: {
id: temp.id,
symbol: temp.symbol.toUpperCase(),
name: temp.name,
image: temp.image,
current_price: temp.current_price,
market_cap: temp.market_cap,
market_cap_rank: temp.market_cap_rank,
fully_distributed_valuation: temp.fully_distributed_valuation,
total_volume: temp.total_volume,
high_24h: temp.high_24h,
low_24h: temp.low_24h,
price_change_24h: temp.price_change_24h,
market_cap_change_24h: temp.market_cap_change_24h,
circulating_supply: temp.circulating_supply,
total_supply: temp.total_supply,
max_supply: temp.max_supply,
ath: temp.ath,
ath_change_percentage: temp.ath_change_percentage,
atl: temp.atl,
atl_change_percentage: temp.atl_change_percentage,
atl_date: temp.atl_date,
last_updated: temp.last_updated
}
});
}
What I want is to filterr by symbol and name like this which throws an error
You cannot use [object Object] as a query parameter.
tickersToUpdate.push({
filter: [{ symbol: temp.symbol.toUpperCase() }, { name: temp.name }],
update: {
id: temp.id,
symbol: temp.symbol.toUpperCase(),
name: temp.name,
image: temp.image,
current_price: temp.current_price,
market_cap: temp.market_cap,
market_cap_rank: temp.market_cap_rank,
fully_distributed_valuation: temp.fully_distributed_valuation,
total_volume: temp.total_volume,
high_24h: temp.high_24h,
low_24h: temp.low_24h,
price_change_24h: temp.price_change_24h,
market_cap_change_24h: temp.market_cap_change_24h,
circulating_supply: temp.circulating_supply,
total_supply: temp.total_supply,
max_supply: temp.max_supply,
ath: temp.ath,
ath_change_percentage: temp.ath_change_percentage,
atl: temp.atl,
atl_change_percentage: temp.atl_change_percentage,
atl_date: temp.atl_date,
last_updated: temp.last_updated
}
});
}