Folks,
Can anyone help me or direct me to an example of a knockout viewmodel which contains an array of objects being passed to an asp.net mvc action? The only examples I have seen show just simple arrays of strings being passed.
Thanks
Folks, Can anyone help me or direct me to an example of a knockout
Share
Here’s an example from the official Knockout site. It’s a Contacts editor build with nested arrays. [jsFiddle].
A fitting ASP.NET MVC Action could look like
Where Contact is defined as the class:
Where Number is defined as the class:
Given the JavaScript Knockout View Model from the example. Your
savemethod could look like this