I am new to reactjs and javascript as well.
Here, I have an array of object which is like ,
[
{
"id": "CSS",
"questionCount": [
{
"level": "TOUGH",
"type": "NON_CODE",
"count": "1"
}
]
},
{
"id": "Backbone",
"questionCount": [
{
"level": "TOUGH",
"type": "CODE",
"count": "2"
},
{
"level": "TOUGH",
"type": "NON_CODE",
"count": "5"
},
{
"level": "MEDIUM",
"type": "NON_CODE",
"count": "7"
},
{
"level": "EASY",
"type": "NON_CODE",
"count": "6"
}
]
},
]
Now, here what I want is to have an array of object which will have all the objects that are present in the questionCount array.
so, it will be like ,
[ {
"level": "TOUGH",
"type": "NON_CODE",
"count": "1"
}, {
"level": "TOUGH",
"type": "CODE",
"count": "2"
},
{
"level": "TOUGH",
"type": "NON_CODE",
"count": "5"
},
{
"level": "MEDIUM",
"type": "NON_CODE",
"count": "7"
},
{
"level": "EASY",
"type": "NON_CODE",
"count": "6"
} ]
So, can any one help me with this ?