I have an below json data.I would like to know how to remove empty children in json data ("children":[]) using java script code.Actually I would like to pass this json data in react code for generating dynamic menu.
{
"items": [
{
"Id": 1,
"name": "Master",
"url": null,
"icon": null,
"Parent": null,
"children": [
{
"Id": 2,
"name": "Single Master",
"url": "/base/jumbotrons",
"icon": "/theme/colors",
"Parent": 1,
"children": []
},
{
"Id": 3,
"name": "Double Master",
"url": "/base/jumbotrons",
"icon": "/theme/colors",
"Parent": 1,
"children": []
}
]
}
]
}