I have a javascript object like:
{
  a: 3,
  b: 10,
  c: 2,
  d: 7,
}
I have an array containing string representations of the property names:
[ "c", "b", "a", "d" ]
How do I rearrange my object so that the properties are arranged in the same order as in the array, eg:
{
  c: 2,
  b: 10,
  a: 3,
  d: 7,
}
 
     
    