Reputation: 11824
I need to serialize two form
elements into one. But the problem is one has id #form1
but other is coming from elsewhere as an object let say variable objform
Serializing with two string IDs is easy
$("#form1, #form2").serialize();
How can I serialize one string and one object? Is there an elegant way doing it with object without assigning a dummy random id to the object form?
Upvotes: 0
Views: 48
Reputation: 2819
try it like so:
//object2 into object1
$.extend(object1, object2);
Upvotes: 0