How to print jquery object/array
arrays, jquery, json, object
Solution
var arrofobject = [{"id":"197","category":"Damskie"},{"id":"198","category":"M\u0119skie"}];
$.each(arrofobject, function(index, val) {
console.log(val.category);
});
Problem
I get id and category name from mysql database. When I am alerting a result, I get: ``` [{"id":"197","category":"Damskie"},"id":"198","category":"M\u0119skie"}] ``` (Is this object?) How can I print a result like this: Damskie M\u0119skie M\u0119ski - has bad encoding. It should be Męskie. How can I change this?