Object array filter

I have a object like this
var obj = {
key1: [
{ id: 1, f1: “x”, f2: “y”, f3: “z” },
{ id: 2, f1: “q”, f2: “w”, f3: “e” },
{ id: 3, f1: “a”, f2: “s”, f3: “d” }
],
key2: [
{ id: 1, f1: “z”, f2: “x”, f3: “c” },
{ id: 2, f1: “r”, f2: “t”, f3: “y” },
{ id: 4, f1: “f”, f2: “g”, f3: “h” }
],
key3: [
{ id: 2, f1: “b”, f2: “n”, f3: “m” },
{ id: 5, f1: “j”, f2: “k”, f3: “l” }
]
}
find equal id in each key
I want to a response like below, how can i do?
var res = {
key1: [
{ id: 2, f1: “q”, f2: “w”, f3: “e” }
],
key2: [
{ id: 2, f1: “r”, f2: “t”, f3: “y” }
],
key3: [
{ id: 2, f1: “b”, f2: “n”, f3: “m” }
]
}

yes, in this example id 2