You can grab the product object's entires using Object.entries():
[["color", "red"], ["type", "2"], ["status", "true"]]
Once you have the entries, you can map over each inner array (ie: each key-value pair) using .map(). For each inner array, you can use destructuring assignment ([key, value]) => to extract both the first and second elements (ie: the key and the value) from the inner array. You can then return a new array, which contains your key in the first index, and a function as a value that checks for equality against the current value and the input argument to the function:
[
[ "color", arg => arg === val ],
[ "type", arg => arg === val ],
[ "status", arg => arg === val ]
]
The above inner arrays are still in the form of [key, value]. As this is the case, you can use Object.fromEntries() on the above array to convert it into an. object:
const products = { color: 'red', type: '2', status: 'true' };
const filters = Object.fromEntries(Object.entries(products).map(([key, val]) => [
key, arg => arg === val
]));
console.log(res);
The argument name doesn't match the name of the key, but that shouldn't matter as the argument is a variable