//
var field = [{
field: "",
display: "host",
visible: true,
type: "checkbox"
}, {
field: "",
display: "department",
visible: true,
type: "input"
}]
// list
var list = [{
id: 1,
host: "1.1 .1 .1",
department: ""
}]
merge two arrays and return an array similar to the following
[{
id: 1,
host: {
field: "",
display: "host",
value: "1.1 .1 .1",
visible: true,
type: "checkbox"
},
department: {
field: "",
display: "department",
value: "",
visible: true,
type: "input"
}
}
]