Getting objects from an Array
<p>I may be doing this very badly but I'm new to this!
if I have an array that contains objects like this</p>

<pre><code>var company = [H7 = {companyName:"company1"},F4 = {companyName:"company2"}]
</code></pre>

<p>If I get a reference as a string say "F4" is there any way I can go</p>

<pre><code>myCompName = company "F4" companyName and get the result "company2"
</code></pre>

<p>I was trying to use inArray like this</p>

<pre><code>myStand = $.inArray("F4", companyObjects)
myCompName = companyObjects[myStand].companyName
</code></pre>

<p>but this doesn't work and yet</p>

<pre><code>myStand = $.inArray(F4, companyObjects)
myCompName = companyObjects[myStand].companyName
</code></pre>

<p>does work. Do I have my array set up wrong or is there a way to do this?
Thank you
Alex</p>
