I have an array of objects that I want sorted in an unconventional way.
[
  {
    type: 'web',
    id: 1
  },
  {
    type: 'graphics',
    id: 2
  },
  {
    type: 'UX',
    id: 3
  },
  {
    type: 'custom',
    id: 4
  }
]
How would I go about sorting this array by object.id so they appear in the order 1, 3, 4, 2 instead?
 
     
    