VB Collection in JavaScript
<p>I've been serching the net for quite some time and maybe there is no solution for my problem but I hoped you might be able to help me. I'm currently trying to establish a connection to CatiaV5 via JavaScript. The connection itsself is working just fine. Basically it looks like this now:</p>

<pre><code>var catia = new ActiveXObject('CATIA.Application');
var doc = catia.ActiveDocument;
</code></pre>

<p>But here's my problem. The returned object is a <code>Collection</code> in VB and there seems to be no <code>DataType</code> equivalent to this. So this is what i get when i try to read my variables. For example:</p>

<pre><code>doc.Product
</code></pre>

<p>returns </p>

<pre><code>[object] {};
</code></pre>

<p>So this seems to be empty. However if then I try to get</p>

<pre><code>doc.Product.Name
</code></pre>

<p>which by that logic should be undefined, instead i get</p>

<pre><code>"Part1"
</code></pre>

<p>so the correct name of my Part/Product is returned.  </p>

<p>All the Catia stuff probably isn't that relevant for the question.  </p>

<p>my question: Is there any way to somehow parse a <code>VB-Collection</code> on a <code>JavaScript</code> object or something similar, to get the contents of what is returned?</p>