I tested everything I knew and I searched, but nothing worked.
I have an array, this array contains flexible objects.

```
let filter = [
    { key1: "stringReq" },
    { key1: "1" },
    { key1: "2" },
    { key1: "3" },
    { key1: "someString" },
    { key2: "stringReq" },
    { key2: "5" },
    { key2: "6" },
    { key2: "7" },
    { key3: "string" }
];

```

Now I want an array with object like this.

```
let filter = [
    { key1: "stringReq" },
    { key2: "stringReq" },
    { key3: "string" }
];

```

I want only one of the keys in the array. This was an example in my code, I don't have any information of keys or values is a variable array with data.