JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://github.com/SteveSanderson/knockout/raw/master/build/output/knockout-latest.debug.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<select data-bind="options: oCountries, optionsText: 'name', optionsValue: 'isocode', value: selectedIsocode">
</select>
CRM data controller: <span data-bind="text: selectedCountry().crmdatacontroller"></span>
JavaScript
var countries = [
{
"name": "Afghanistan",
"isocode": "AF",
"language": "English",
"crmdatacontroller": "CRM India"},
{
"name": "Aland Islands",
"isocode": "AX",
"language": "Finnish",
"crmdatacontroller": "CRM Finland"}
]
var viewModel = {
oCountries: ko.observableArray(countries),
selectedIsocode: ko.observable('AX')
};
viewModel.selectedCountry = ko.dependentObservable(function() {
var selectedCode = this.selectedIsocode();
return ko.utils.arrayFirst(this.oCountries(), function(country) {
return country.isocode === selectedCode;
});
}, viewModel);
ko.applyBindings(viewModel);