title: Store function result to variable
body: <p>How can I store the result of a function to a variable?</p>
  
  <p>In navigating an object that contains an array, I am looking for one value, <em>value1</em>, once that is found I want to get the value of one of its properties, <em>property1</em>.</p>
  
  <p>The code I am using below is an example and is incorrect.</p>
  
  <pre><code>function loadSets(id){
     clworks.containers.find(function(i){
        return i.get('property1')===id;
     });
  }
  </code></pre>
  
  <p>My intent is to navigate the object below:</p>
  
  <pre><code>clworks.containers
      containers[0].property0.id
      containers[1].property1.id
  </code></pre>
  
  <p>I am trying to determine how to find which item in the array has a property value equal to the id used in the function and then store it as a variable.</p>