Here is a JSON object:
{ "A": " ", "B": "x", "C": " " }
I am trying to extract specific values in array form like this:
["A", "C"]
This array represents the keys from the original JSON object that do not have the value "x".
During a REST subscription, I encounter the following scenario:
...
.subscribe(
(data: Map<string, string>)=>{
Object.entries(data).filter((item: string[]) => item[1] !== 'x')
}
...
);
However, this code results in a multidimensional array:
[['A', ' '],['C', ' ']]
I am struggling to properly reduce this multidimensional array and achieve my desired output.