Sort Array of Objects Based on number of Keys it contains : <p>This is a sample code but it does not seem to sort the array. All I want is the array of object sorted in such a manner that the object with maximum keys comes first.</p>

<pre><code>CSVData.sort(function(item1,item2){
                            return Object.keys(item2).length - Object.keys(item1);
                        });
</code></pre>
