I have something like this (data should be a global variable):
var data = {
fields:{
id: 0,
ticket: 0,
description: 0,
}
}
Now I want to use something like this to change these variables:
function toggleStatus(element) {
data[fields][element] = 1;
}
This doesn't work, of course, but what is the correct way to manipulate data in similar fashion?
Basically, I need to create a multidimensional array that changes it's status based on user input.