Reputation: 3394
I have a tree of json data. This data contains a nested array of IDs. I need to convert the tree back to awesome_nested_set.
My tree looks like this:
{
"menu_211"=>
{
"menu_135"=>
{
"menu_197"=>
{
}
},
"menu_144"=>
{
},
"menu_208"=>
{
}
},
"menu_1"=>
{
"menu_80"=>
{
"menu_81"=>
{
},
"menu_82"=>
{
},
"menu_202"=>
{
}
}
}
What is the best way to convert this to what nested set needs to save the records new left and right fields?
Upvotes: 2
Views: 879
Reputation: 3394
Found a solution. http://github.com/matenia/jQuery-Awesome-Nested-Set-Drag-and-Drop
Upvotes: 1