Say I have something like:
var obj = {id: 1, name: "Some name", color: "#444444" };
I want to serialize that object. I tried:
$(obj).serialize();
but that didn't work.
Any ideas?
You should use jQuery.param() instead.
jQuery.param()
With vanilla JS, you would use JSON.stringify instead.
JSON.stringify
1.4m articles
1.4m replys
5 comments
57.0k users