title: Flatten nested object’s keys into an array, with JS
body: <p>I have an object, and I’d like to get each “branch” of the “tree” as an array. (Feel free to correct my terminology also!) What I have is like the following:</p>
  
  <pre><code>var features = {
    "f": {
      "t": "100",
      "f": {
        "i": ['150'],
        "b": ['300'],
        "f": {
          "k": 100
        }
      },
      "l": ['255']
    },
    "c": {
      "s": {
        "t": ["100"]
      },
      "t": "100"
    }
  };
  </code></pre>
  
  <p>And I’d like to parse it into the following result, so I can iterate over it again and pass it into another function.</p>
  
  <pre><code>var result = [
    "ffi",
    "fffk",
    "fl",
    "ct"
  ]
  </code></pre>
  
  <p>What I have so far <a href="http://jsbin.com/xayexeve/17/edit?js,console" rel="nofollow">is on JS Bin here</a>. Any help or pointers in the right direction would be greatly appreciated! Thanks!</p>