How to deep filter objects (not object arrays)
问题 I'm working with a JS data structure that looks something like this: table = { row1: { col1: 'A', col2: 'B', col3: 'C' }, row2: { col1: 'D', col2: 'A', col3: 'F' }, row3: { col1: 'E', col2: 'G', col3: 'C' } }; How would you guys filter this object using JavaScript's native filter/map/reduce functions to produce an array of row object keys that contain the property col3 = "C"? In this case, it would return ['row1', 'row3'] . This is a solution that I originally came up with based on another