Using a argument as a property key : <p>Lets say I got this function:</p>

<pre><code>  vm.setSelectedItem = function(itemName, searchedItems){
    vm.selectedItem = _.findWhere(searchedItems, {name: itemName});
  };
</code></pre>

<p>I need to make the "name" dynamic</p>

<pre><code>  vm.setSelectedItem = function(itemName, searchedItems, propertyKey){
    vm.selectedItem = _.findWhere(searchedItems, {}); //How do I use the arg propertyKey here?
  };
</code></pre>

<p>How do I do this?</p>
