I have this on success AJAX function
success: function(response){
console.log(response);
if(response.success){
$.each(response.vote, function(index, value){
alert(value);
});
}
}
and this the JSON response from the console (refer to the image below)

but it throws me "[Object Object]" from the alert prompt, any ideas, clues, help, suggestions, recommendations?
Do not use alert but console.log instead. You will be able to look into all the objects that way and avoid getting spammed.
Also, if you need to look into a deep object, you can use something like https://github.com/WebReflection/circular-json which will allow to print even objects that references themselves (circular reference would fail to print big object).
alert uses the object's toString method, which will return this [Object Object] thing. If you want to print an object nicely, you can use JSON.stringify(yourObject)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With