Jquery filter for nested objects
<p>My code is:</p>

<pre><code> colModel: [

    { display: 'Grade', name: 'Grade', width: 40, align: 'center' },
    { display: 'Grade ID', name: 'ID', width: 180, align: 'left' },
    { display: 'Organization ID', name: 'Organization_ID', width: 120, align: 'left' },
    { display: 'Organization Name', name: 'Organization_Name', width: 130, align: 'left', hide: true }
    ]
</code></pre>

<p>This is passed as a object to a function.</p>

<p>i want to filter it like </p>

<p>//    This worked</p>

<pre><code>   alert(colModel[0].display);

   var obj = colModel.filter(function () {
               return $(this).name == "Grade"; });

  alert(obj.display);
</code></pre>

<p>But this come to be undefined.</p>

<p>ANy help is appreciated</p>

<p>Edit:</p>

<p>The object is passed as a option to a plugin:</p>

<pre><code>$('#filteredResult').FilteredPagedTable({ url: "http://localhost:2014/mySer.svc/GetFilteredPaged", grid: true, pageSize: 4, pageNo: 0, columnName: "ID", IsAscending: true, filteredColumn: $('#ddlColumns').val(), SearchedValue: $('#txtSearchTextBox').val() ,

    colModel: [

    { display: 'Grade', name: 'Grade', width: 40, align: 'center' },
    { display: 'Grade ID', name: 'ID', width: 180, align: 'left' },
    { display: 'Organization ID', name: 'Organization_ID', width: 120, align: 'left' },
    { display: 'Organization Name', name: 'Organization_Name', width: 130, align: 'left', hide: true }
    ]

 });
</code></pre>
