I couldn’t find anything about getting the total JSON record count using jQuery.
Here is the JSON returned:
{'Email':'Please enter your Email.','Password':'Please enter a password.'}
Here is my code:
$(function() { $('#btnSubmit').click(function() { $.ajax({ url: '/account/signup', type: 'POST', dataType: 'json', data: { Email: $('#strEmail').val(), Password: $('#strPassword').val() }, success: function(j) { $('.errMsg').hide(); alert(j.length); // I couldn't get the total count $.each(j, function(n) { $('#err' + n).html(j[n]); $('#err' + n).show(); }) }, error: function(req, status, error) { alert(req); } }); }); });
If you have something like this:
then, you can do: