I have the following line:
$.getJSON('@Url.Action("RegistrationShareClassReport", new { id = ViewBag.Id })', function (data) {
viewModel.RegistrationShareClassReport(data);
});
This basically returns data in json format with different elements. e.g.
id = "2",
name = "tj",
country = "GB"
id = "3",
name = "pj",
country = "IT"
What i want to is from that viewmodel populate an array of all the countries for each item. So i would need to loop through the viewmodel data and extract the countries from each.
I wanted to know i could achieve this in knockout.js?
thanks