obj = {
ticker: "SPY",
strategy: "LOG",
broker: ""
}
const a = {
ticker: 'SPY',
strategy: 'OLD',
broker: 'OOH'
};
const b = {
ticker: 'SPY',
strategy: 'LOG',
broker: 'FOR'
};
const c = {
ticker: 'HG',
strategy: 'KIP',
broker: 'LOOP'
};
const a = {
ticker: 'SPY',
strategy: 'OLD',
broker: 'OOH'
};
const b = {
ticker: 'SPY',
strategy: 'LOG',
broker: 'FOR'
};
const c = {
ticker: 'HG',
strategy: 'KIP',
broker: 'LOOP'
};
const obj = {
ticker: "SPY",
strategy: "LOG",
broker: ""
};
const objs = [a, b, c];
let out = [];
for (let i = 0; i < objs.length; i++) {
if (objs[i].ticker === obj.ticker && objs[i].strategy === obj.strategy) {
out.push(objs[i]);
}
}
console.log(out);