Sorting by Date in json-query?

60 views
Skip to first unread message

crofty

unread,
Aug 27, 2009, 6:44:32 AM8/27/09
to json-query
Hi,
Is it possible to sort by date in json-query?

Suppose I had the json:
var sortableDates = [
{first:'john',last:'doe', created_at: "Wed Aug 26 2009 10:00:00
GMT+0100 (BST)"},
{first:'joe',last:'pass', created_at: "Thu Aug 27 2009 10:00:00
GMT+0100 (BST)"},
{first:'alice',last:'doe', created_at: "Fri Aug 28 2009 10:00:00
GMT+0100 (BST)"}
]

Am I right in thinking that the 'created_at' attributes will need to
be converted to Date objects in order to be sorted correctly. If so,
how is this done in the query?

Thanks
Reply all
Reply to author
Forward
0 new messages