違いはありますか?
var samples = {
"TB10152254-001": {
folderno: "TB10152254",
ordno: "001",
startfootage: "",
endfootage: "",
tagout: "Y"
},
"TB10152254-002": {
folderno: "TB10152254",
ordno: "002",
startfootage: "",
endfootage: "",
tagout: "Y"
},
"TB10152254-003": {
folderno: "TB10152254",
ordno: "003",
startfootage: "",
endfootage: "",
tagout: "Y"
}
};
と
var samples = new Array();
samples["TB10152254-001"] = {
folderno: "TB10152254",
ordno: "001",
startfootage: "",
endfootage: "",
tagout: "Y"};
samples["TB10152254-002"] = {
folderno: "TB10152254",
ordno: "002",
startfootage: "",
endfootage: "",
tagout: "Y"
};
samples["TB10152254-003"] = {
folderno: "TB10152254",
ordno: "003",
startfootage: "",
endfootage: "",
tagout: "Y"
};
編集:
質問を言い換えます:ハッシュを動的に入力するにはどうすればよいですか?私はサンプルのようなことをすることができません。私はTB10152254-003が動的であるため、TB10152254-003 ...それで、それも可能ですか?