Skip to content

Instantly share code, notes, and snippets.

@eliaskg
Created November 25, 2009 20:40
Show Gist options
  • Save eliaskg/243009 to your computer and use it in GitHub Desktop.
Save eliaskg/243009 to your computer and use it in GitHub Desktop.
var test = [{"name": "a", "adress": "b"}, {"name": "b", "adress": "a"}];
var adressSort = [[CPSortDescriptor alloc] initWithKey:@"adress" ascending:NO];
var descriptors = [CPArray arrayWithObject:adressSort];
console.log([test sortUsingDescriptors:descriptors]);
// Produces an error:
// TypeError: Result of expression 'aReceiver.isa' [undefined] is not an object.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment