Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfscript>
- dan = [
- {id:1,name:"jerk",price:12},
- {id:2,name:"jerk2",price:10},
- {id:3,name:"jerk3",price:5}
- ];
- arraysort(dan, function(a,b) {
- if (a.price > b.price) return 1
- else if (a.price < b.price) return -1
- else return 0
- });
- writedump(dan);
- </cfscript>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement