Skip to content

Instantly share code, notes, and snippets.

@devdays
Created December 16, 2014 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devdays/cf703c7020dee0d69453 to your computer and use it in GitHub Desktop.
Save devdays/cf703c7020dee0d69453 to your computer and use it in GitHub Desktop.
Object JavaScript - Knockout observable array
// This observable array initially contains four objects
var productArray = ko.observableArray([
{ product: "Widget", type: "Tool" },
{ product: "Bolt", type: "Fastener" },
{ product: "Washer", type: "Fastener" },
{ product: "Screwdriver", type: "Tool" }
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment