for(let i = 0; i<this.attachments.length; i++){
// this.form.append('pics[]', this.attachments[i]);
var name = this.food_name;
this.menuInfo.push(name, this.attachments[i]);
this.form.append(name, this.attachments[i]);
}
반복문으로 menuInfo라는 배열 안에 name이랑 attachments를 같은 칸에 넣고 싶은데
이렇게 하니까 이름이랑 attachments가 각자 다른 칸에 들어가더라구요
이렇게 말고 0 : [ "name", file ]
1 : [ "name", file ]
2 : [ "name", file ]
이런식으로 만들어보고 싶은데 어떻게 해야 될까요..?
시발 너 기초 하나도 제대로 안되있지
부끄럽지만 그렇습니다..야매로 배운지라
에휴..