I have following response from backend as an array of object,
const cloudData = [
{
dataCenter: "AWS-East",
availablechannels: [
{
channelName: "E-channel1",
id: 1,
},
{
channelName: "E-channel2",
id: 2,
},
{
channelName: "E-channel3",
id: 3,
},
],
},
{
dataCenter: "AWS-West",
availablechannels: [
{
channelName: "W-channel1",
id: 1,
},
{
channelName: "W-channel2",
id: 2,
},
{
channelName: "W-channel3",
id: 3,
},
],
},
];
I need to display on UI grid in following way ,
AWS East
E-channel1
E-channel2
E-channel3
I have tried using es6 map and filter
.map()and.filter(). It's also not clear why you only want "AWS East" and not the other object (or did you just not include them for brevity? If so, you should indicate that in your question)