1
mybook.push({
            pages: $("#id_pages").val()
           });

mybook.serialize()

Error:

Uncaught TypeError: Object [object Array] has no method 'serialize'

How to fix it?

1 Answers1

1

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())

MaveRick
  • 1,181
  • 6
  • 20