title: Convert Object to Array - maintain named keys
body: <p>I am converting an object into an array. The keys of the object contain names such as "cool", as can be seen below:</p>
  
  <pre><code>var obj = {
    "cool": "Mustang",
    "family": "Station Wagon",
    "small": {
      0: "small car 1",
      1: "small car 2"
    }
  };
  </code></pre>
  
  <p>When converting, the returned array looks as followed:</p>
  
  <pre><code>Array[3]
  0:"Mustang"
  1:"Station Wagon"
  2:Object
      0:"small car 1" 
      1:"small car 2"
  </code></pre>
  
  <p>As you can see in the array above the names of keys from the object such as "cool" are lost, instead they are replaced with numbers. Furthermore, the array contains an object, I would like this object to be an array within the array.</p>
  
  <p>I would like the returned array to be like this instead:</p>
  
  <pre><code>Array[3]
  "cool":"Mustang"
  "family":"Station Wagon"
  "small": Array[2]
      0:"small car 1" 
      1:"small car 2"
  </code></pre>
  
  <p>I would very much appreciate your help. A fiddle with the code can be found here: <a href="https://jsfiddle.net/v02q4sy2/8/" rel="noreferrer">https://jsfiddle.net/v02q4sy2/8/</a> </p>
  
  <pre><code>var obj = {"cool":"Mustang","family":"Station Wagon","small":{0:"small car 1",1:"small car 2"}}
  
  var arr = $.map(obj, function(value, index) {
      return [value];
  });
  
  console.log(arr);
  </code></pre>