My Data from API looks like below,
[
{
"id": 1,
"appName": "string",
"defaultAction": "string",
"defaultMessage": "string",
"rules": [
{
"id": 1,
"version": "string",
"brand": "string",
"action": "string",
"message": "string"
},
{
"id": 2,
"version": "string",
"brand": "new brand",
"action": "string",
"message": "string"
}
]
}
]
I tried like below to read child array from Parent Array from State to bind to table
const { posts } = this.state;
console.log(posts);
const rule_list = posts.map(rules => {
console.log(rules);
});
But I see it still returns complete array rather than only child element.Can someone help me here.
console.log(posts);is prints