I have an object called assignments which contains arrays as such;
assignments = {
'version_1': [1,2,3,4,5],
'version_2': [6,7,8,9,0],
'version_3': [3,4,5,6,7]
}
if I want to get the values of a particular version I can simply say something like console.log(assignments.version_2);
But what if I have an integer set in a variable? How would I reference the values dynamically. e.g.
var version_id = 2;
console.log(assignments.version_[version_id]);