Receiving empty data on ajax request in spite of available data
<p>I am trying to get the sub-category list of a category by an AJAX request through <code>admin-ajax.php</code>. The categories are under a custom post type. Each category has sub categories. However the AJAX request returns no data in the <code>console</code>.</p>

<pre><code>jQuery.ajax({
    type: 'POST',
    url: classipress_params.ajax_url + "?action=dropdown-child-categories",
    dataType: "json",
    data: {
        cat_id : category_ID
    },
    //show loading just when dropdown changed
    beforeSend: function() {
        ...
    },
    //stop showing loading when the process is complete
    complete: function() {
        .....
    },
    error: function(XMLHttpRequest, textStatus, errorThrown){
        ....
    },
    // if data is retrieved, store it in html
    success: function( data ) {
        // child categories found so build and display them
        if ( data.success === true ) {
            console.log(data);

            ....
        }
    }
});
</code></pre>

<p>Am i doing any wrong? <code>category_ID</code> is okay, I tested that. The result I get in the console:</p>

<pre><code>{
    success: true, 
    html: ""
}
</code></pre>