What is the best way to filter an object this way in ES6?
Starting data:
const acceptedValues = ["value1","value3"]
const myObject = {
prop1:"value1",
prop2:"value2",
prop3:"value3"
}
Expected output:
filteredObject = {
prop1:"value1",
prop3:"value3"
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…