We're using knockout.js heavily in our app, but have run into a new scenario. It revolves around ko.toJSON, but it appears to be the underyling ko.toJS that's causing the problem.
We have an object with a number of properties, one of which is an array of other objects. After running it through ko.toJS, it becomes an object with each property given the name of the original index. I've not been able to replicate this in test code - indeed ko.toJS properly keeps an array as an array in my other tests.
Example of ko.toJS getting it wrong and converting it to an object:

Example of ko.toJS getting it right, and leaving it as an array:

Any thoughts on why ko.toJS may be causing this or what to look at next appreciated...!
Update
When using the debugger version of knockout, this is how it's reporting the Array being passed in to mapJsObjectGraph:

instanceofcompares references of prototypes and theArrayprototype (as with all other objects) is unique for each host environment.