Searching objects #1

Closed
theluk opened this Issue Feb 13, 2012 · 1 comment

2 participants

@theluk

Hi there.

is there a way to search in objects and return them? or is this on your list already?

var items = [{ title:"London"}, {title:"Munich"}];
Sorter.sort(items, "Lon", "title");
//or
Sorter.sort(items, "Lon", function(obj) { return obj.title });
@padolsey padolsey closed this in 9e446c9 Feb 13, 2012
@padolsey
Owner

This is now possible with the following calling pattern:

var items = [{ title:"London"}, {title:"Munich"}];
Sorter.sort(items, "Lon", function(obj, calc) { return calc(obj.title) });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment