I can't find anything but basic examples of ko.observablearrays that show arrays of simple strings. I have an observable array that holds a largish JSON object with a lot of properties. I need to get the one of the objects in the array based off on the id property in the array. I have this code to get the Id:
self.selectedOrgId.subscribe(function (currentOrgId) {
alert(currentOrgId);
}, self);
my observable array is populated via an ajax get request and looks something like this:
[
{"userGuid":"37ab100e-f97b-462a-b3f4-79b8fbe24831",
"orgId":1,
"orgName":
"company ltd",
"isHiring":true,
...snip...}
more...
]
How can I look into my array and get the object with the orgId that I have?