title: Javascript get parent of item in array
body: <p>I am trying to get the parent of a specific (referenced) object in an array.
  Example:</p>
  
  <pre><code>var data = [
      {
          key: "value1"
          children: [
              {
                  key: "value2"
              },
              {
                  key: "value3"
                  children: [
                      {
                          key: "value3a"
                      },
                      {
                          key: "value3b"
                      }
                  ]
              }
          ]
      },
      {
          key: "value4"
      }
  ];
  </code></pre>
  
  <p>When some stuff happens, I get the following:</p>
  
  <pre><code>var clicked = {
      key: "value3a"
  }
  </code></pre>
  
  <p>In this case I know that <code>value3a</code> has been clicked, and it's databound with the <code>data</code> variable.</p>
  
  <p>The question is, how do I easily get the parent of <code>clicked</code>? It should return the whole children-array of <code>value3</code> which I want:</p>
  
  <pre><code>[
      {
          key: "value3a"
      },
      {
          key: "value3b"
      }
  ]
  </code></pre>
  
  <p>Note: currently I am using UnderscoreJS to find the object of my array. So maybe UnderscoreJS could help?</p>