I'm trying to display data from an external JSON, and I'm practicing based on an example from a few years ago where the data isn't external: http://jsfiddle.net/axrwkr/5t5fj/50/
Here is my attempt, referencing an external JSON, on jsfiddle: http://jsfiddle.net/54sqn/4/
I have had success using Leaflet's L.GeoJson for other purposes (declaring the string array in the external file), but ultimately I would like to use ko.mapping to display/allow editing of a standard JSON. Anyway, I have scoured for just a basic example like this to display one entry from an external JSON in a straightforward way, and I can't seem to find an actual working example. I have seen so many more advanced examples, that I think I've mixed things up. Thank you for the help!
==============
JavaScript:
var viewModel = {};
$.getJSON("http://yourjavascript.com/348728012/temp.js", function (data) {
viewModel.model = ko.mapping.fromJSON(data);
ko.applyBindings(viewModel);
});
`
HTML:
Full Name: <input data-bind="value: fullName" disabled="disabled" /><br />
Ref: <input data-bind="value: referenceNumber" disabled="disabled" /><br />
Position: <input data-bind="value: position" disabled="disabled" /><br />
Email: <input data-bind="value: email" disabled="disabled" /><br />
Dept: <input data-bind="value: departmentName" disabled="disabled" /><br />
Country: <input data-bind="value: country" disabled="disabled" /><br />