I've a nested objects like:
Album
-- Track 1
----Clip
--Track 2
----(None)
Album
--Track x
----Clip
i've created viewModel using knockout mapping plugin. Everything is working as expected (in fact with help of this thread can't resolve knockout js with nested objects)
Now the problem is Clip object for Track 2 does not exist initially. In the interface, user created it and i got proper JSON from server (ajax call) about this clip object. Now, how can I update my viewModel (viewModel.albums is the mapped object) to push this Clip info to Track 2 from my Ajax callback? I do not have any clue about the context of the Track from the ajax callback. If I had, it would be easier, I think.
If the question does not make sense, I will try to put something more visual in jsfiddle. Thanks in advance.