Is there a difference between:
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"
}
};
AND
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"
};
EDIT:
I will re-phrase the question:
How do I populate the hash dynamically?
I can't do something like samples.TB10152254-003 because i TB10152254-003 is dynamic...so, is that even possible?