Reputation: 1255
I have two variable having value of searializeArry like this -:
var Data = $("#searchValue").serializeArray();
var Data_filter =$("#filter_head_area_form").serializeArray();
I want to send both the array value in Var Data . So that my ajax call will be like this
$.ajax({
url: 'something.com',
type:"post",
data : Data,
Upvotes: 2
Views: 1960
Reputation: 1041
you can also do it using below statement
$("#searchValue, #filter_head_area_form").serializeArray();
Upvotes: 0
Reputation: 994
$.ajax({
url: 'something.com',
type:"post",
data : Data.concat(Data_filter),
Upvotes: 0
Reputation: 77482
Try this
var Data = $("#searchValue").serializeArray();
var Data_filter =$("#filter_head_area_form").serializeArray();
Data = Data.concat(Data_filter)
Or you can send
$.ajax({
url: 'something.com',
type:"post",
data : {
Data: Data,
Data_filter: Data_filter
}
}),
Upvotes: 2