Received: by 10.194.78.40 with SMTP id y8csp1449227wjw;
Sat, 20 Jun 2015 22:23:48 -0700 (PDT)
Received: from smart1.russianpost.ru (smart1.russianpost.ru. [91.215.36.115])
by mx.google.com with ESMTP id wd2si13339101lbb.123.2015.06.20.22.23.47
for <***@gmail.com>;
Sat, 20 Jun 2015 22:23:48 -0700 (PDT)
Received: from [10.6.40.76] (HELO VEGA)
by smart1.russianpost.ru (CommuniGate Pro SMTP 4.2.10)
with ESMTP id 50561940 for ***@gmail.com; Sun, 21 Jun 2015 08:23:28 +0300
From: webmaster@russianpost.ru
var src = [
{name: 'Vasya'},
{name: 'Zina'},
{name: 'Vasya'},
{name: 'Vasya'},
{name: 'Petya'},
{name: 'Vasya'},
{name: 'Petya'},
{name: 'Vasya'},
];
var temp = [];
src.forEach(function(e){
if(temp.indexOf(e.name) == -1){
temp.push(e.name);
}
});
src = temp.map(function(e){
return {name:e};
});
console.log(src);
var arr1 = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'];
var arr2 = [1, 2, 3, 4, 5, 6, 7, 8];
var arr3 = [];
arr1.forEach(function(value, index) {
arr3.push(value);
if (index % 2 == 1) {
arr3.push(arr2.shift()); // Изменяет arr2!
}
});
console.log(arr3);
не отдам профессионалу, потому что он никогда не сделает так, как мне нужно
<input name="???"
<input id="files-field" name="myfiles" type="file" multiple="multiple" />
data: $('#photo-form').serialize()