187
rated 0 times
[
193]
[
6]
/ answers: 1 / hits: 152349
/ 11 Years ago, sat, march 16, 2013, 12:00:00
I have a json array which looks something like this:
{
id: 1,
children: [
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
},
{
id: 2,
children: {
id: 3,
children: {
id: 4,
children:
}
}
}]
}
I would like to have a function which removes the elements which has the children empty. How can I do it? I am not asking for the answer, only suggestions
More From » jquery