I am working with rails 3 & using act_as_tree. How can I iterate on nested json so that I can find difference between two nodes?
json that I want to compare looks like this :
{
"text": "To Do",
"children": [{
"text": "Go jogging",
"children":[]
}, {
"text": "Take a nap",
"children":[]
}]
}
and
{
"text": "To Do",
"children": [{
"text": "Climb Everest",
"children":[]
}]
}