How can I find the length of a specific index in an array
<p>have tried various things</p>

<pre><code>split[6].length
String.split[6].length
</code></pre>

<p>along these lines without success get this error message for the last one ...</p>

<p>ReferenceError: "string" is not defined.</p>

<p>Hi Thanks for all the replies, in the end I created an array based on the index of the original array and then queried the length of that.  As you can see I am having trouble removing single and double quotes from the input strings. New to javascript and its making me a little crazy lol.</p>

<pre><code>// Loop through all the input messages
for (var i = 0; i &lt; input.length; i++) {    
var next = output.append(input[i]);
// Get the body of the current input message
var body = input[i].text;
// Set the body
next.text = body ;
next.text.replace(/\'/g, "&amp;#39;");
next.text.replace(/\"/g, "&amp;#34;");
//replace(/['"]/g,'');
// Set a property    
var split = next.text.split(",");       
var array1 = split[5];
var array2 = split[2];
next.setProperty("aaaLength", split.length);
next.setProperty("aaaSplitValue", split.length);  
next.setProperty("aaaArray1Value", split.length); 
next.setProperty("aaaArray2Value", split.length);

if (next.getProperty("BaseFilename")=="name"){
    next.text.replace(/\'/g, "&amp;#39;");
    next.text.replace(/\"/g, "&amp;#34;");
    //replace(/['"]/g,'');
    if(split.length&gt;10){

        next.setProperty("FullFilename","nameError"+i);
        next.setProperty("BaseFilename","nameError"+i);
        next.setProperty("Suffix",".err");

        }
        if(array1.length&gt;10){
            next.setProperty("FullFilename","nameSnameSuffixError"+i);
            next.setProperty("BaseFilename","nameSnameSuffixError"+i);
            next.setProperty("Suffix",".err");      
        }
}
</code></pre>
