I have JavaScript array and fill it data from mvc modal:
<script type="text/javascript">
    var letterOfResponsibilityNotes = Array(0);
    @if (Model.Step2.SelectedCountryList.Count != 0)
    {
        foreach (var item in Model.Step2.SelectedCountryList)
        {
            <text>letterOfResponsibilityNotes["@item.Code"]='@item.LetterOfResponsibilityNote'</text>
        }
    } 
Then I try to get letterOfResponsibilityNotes array length:
if ($(letterOfResponsibilityNotes).length > 0)
{ ... }
But I get always lenth = 0, despite I see the data in FireBug.
Thanks!
 
     
     
     
    