Ajax success: Data length Undefined
<p>Why am I getting undefined in data.length in the ajax.sucess?</p>

<p>Here is the code,some parts have removed for sake of brevity:</p>

<pre><code>$.ajax({
    data: JSON.stringify(data),
    url: urlGetProviderQualificationTimeData,
    type: 'POST',
    contentType: "application/json; charset=utf-8",
    success: function (data) {
        if (data.length &gt; 0) {
            $("#loading").hide();
            $("#providerqualification-main").show();
            $("#tblProviders").show();
            SetHeaderFields(data);
        } else {
            $("#NoRecordFound").show();
            $("#providerqualification-main").hide();
        }
    },
    complete: function (e) {
        $("#loading").hide();
    }
});
</code></pre>

<p><a href="https://i.stack.imgur.com/UNxQw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UNxQw.png" alt="enter image description here"></a></p>