Luis - if you emit them as numbers rather than strings, they will sort in the proper order.
>From memory, I think one of the string methods is used to convert string to int. Alternatively, consider storing those properties as numbers in the first place - not only will your keys sort properly, but it will probably use less space per doc and build views faster. HTH, -Patrick On 17/03/2010 10:05 PM, "Luis Gomez" <[email protected]> wrote: Hi, quick one this time... How can I make a map function sort these keys numerically? Is there an easy/conventional way or do I need to pad the numbers? 1 10 11 12 13 14 15 16 17 18 19 2 20 21 22 23 24 25 26 27 28 29 3 30 31 32 33 34 35 36 37 38 39 ... Thanks, Luis
