In the html page i have a view model
AppViewModel = {
people : ko.observableArray([
{
fName : 'john'
lName :'conor'
}, {
city : 'dallas'
}, {
state : 'texas'
} ]),
};
and i fetch the json data from the server in the format
{
fName : 'john'
lName :'conor'
}, {
city : 'dallas'
}, {
state : 'texas'
}
i want the json data to get added to the array(push), anything like AppViewModel.people.push(ko.mapping.fromJS(jsondata, viewModel)) but it is not working. Any ideas?