I have a JSON array of objects that looks something like this:
var garments [{ name: \'Garment 1\', isDesignable: false, priority: 3 },{ name: \'
garments.sort(function (a, b) { if (a.isDesignable == b.isDesignable) { return a.priority - b.priority; } else if (a.isDesignable) { return -1; } else { return 1; } });