Professional Web Applications Themes

Array Sorting - Coldfusion - Advanced Techniques

Hey everyone, I figured someone out there must have come across the need for this before, so rather than continue banging my head against the wall, I turn to the community. Basically, I have an array of structs. Within each array element, is a struct key that contains a numeric value. This array is built in a relatively random order. Once I have the completed array, I need to be able to rebuild the array sorted, either ASC or DESC, by this one struct key. So in essence, I need to be able to restructure an array based on sorting ...

  1. #1

    Default Array Sorting

    Hey everyone,

    I figured someone out there must have come across the need for this before, so
    rather than continue banging my head against the wall, I turn to the community.

    Basically, I have an array of structs. Within each array element, is a struct
    key that contains a numeric value. This array is built in a relatively random
    order. Once I have the completed array, I need to be able to rebuild the array
    sorted, either ASC or DESC, by this one struct key.

    So in essence, I need to be able to restructure an array based on sorting of
    myArray[x].myStructKey

    I've tried duplicating the concept of a C/C++ Bubble Sort, but for some reason
    I end up having to refresh a couple times before the array is sorted correctly.

    Anyone have a function like this that already exists?

    Thanks so much in advance,

    DCS Admin Guest

  2. #2

    Default Re: Array Sorting

    No one has a solution to this? :-/
    DCS Admin Guest

  3. #3

    Default Re: Array Sorting

    I think you might find something useful here: [url]http://www.cflib.org/udf.cfm?ID=359[/url]

    pukkel Guest

Similar Threads

  1. Sorting array vs sorting paginated array
    By limitedwave777 in forum Macromedia Flex General Discussion
    Replies: 0
    Last Post: May 14th, 01:58 PM
  2. Sorting an Array containing a structure...
    By ultrafresh in forum Coldfusion - Advanced Techniques
    Replies: 0
    Last Post: April 8th, 02:59 PM
  3. sorting multi-array
    By Ji e in forum PHP Development
    Replies: 6
    Last Post: July 25th, 08:40 AM
  4. Array Sorting, 2 items...
    By Dan Joseph in forum PHP Development
    Replies: 2
    Last Post: July 22nd, 06:36 PM
  5. Sorting a Multidimensional Array
    By Brian in forum PHP Development
    Replies: 1
    Last Post: July 3rd, 02:36 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139