Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created August 27, 2011 20:12
Show Gist options
  • Select an option

  • Save ELLIOTTCABLE/1175814 to your computer and use it in GitHub Desktop.

Select an option

Save ELLIOTTCABLE/1175814 to your computer and use it in GitHub Desktop.
var index = 0, messages = response[0].messages;
for (id in messages)
if (messages.hasOwnProperty(id))
messages[index++] = messages[id]
Array.prototype.sort.call(messages, function(a, b) {
return a.phoneNumber.localeCompare(b.phoneNumber) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment