Skip to content

Commit

Permalink
adds jsFiddle example link to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
danstocker committed Jul 20, 2013
1 parent 9f3c539 commit 7c32e48
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -23,10 +23,13 @@ Also, the new Jorder leaves the following jQuery-inspired features behind:
Examples
--------

[JSFiddle](http://jsfiddle.net/danstocker/hYm2X/)

Assume that `tableJson` holds an array of personal records.

var table = jorder.Table.create(tableJson)
.addIndex(['lastName', 'firstName'], 'string', true);

// fetching records where name starts with "sm"
table.queryByPrefix('name', "sm"); // [{lastName: "Smith", firstName: "John"}, {lastName: "Small", firstName: "Bradley"}]
table.queryByPrefix('name', "sm");
// [{lastName: "Smith", firstName: "John"}, {lastName: "Small", firstName: "Bradley"}]

0 comments on commit 7c32e48

Please sign in to comment.