mybook.push({
pages: $("#id_pages").val()
});
mybook.serialize()
Error:
Uncaught TypeError: Object [object Array] has no method 'serialize'
How to fix it?
mybook.push({
pages: $("#id_pages").val()
});
mybook.serialize()
Error:
Uncaught TypeError: Object [object Array] has no method 'serialize'
How to fix it?
Actually mybook
is not a jQuery object,As of jQuery API you should pass it to jQuery Class then you can use the method .serialize()
or .serializeArray()
console.log($(mybook).serialize())