Javascript dependency list
<p>I have a list of elements where I need to figure out the dependency.</p>

<p>I have:</p>

<pre><code>[{
  "a": ["b", "d"]
}, {
  "d": ["c", "e"]
}]
</code></pre>

<p><code>a</code> is depending on <code>b</code> and <code>d</code>, and <code>d</code> on <code>c</code> and <code>e</code>. Is there a way to construct the dependencies in a clever way for this? The output should (could) be:</p>

<pre><code>["b", "c", "e", "d", "a"]
</code></pre>

<p>/Kristian</p>
