Sadu Sadu - 1 year ago 74
jQuery Question

How to print jquery object/array

I get id and category name from mysql database.

When I am alerting a result, I get:


(Is this object?)

  1. How can I print a result like this:



  2. M\u0119ski - has bad encoding. It should be Męskie. How can I change this?

Answer Source
var arrofobject = [{"id":"197","category":"Damskie"},{"id":"198","category":"M\u0119skie"}];

$.each(arrofobject, function(index, val) {