access data in array with this
I have the following array:
- var arraydata={INPUTID:{ field1: 'field1',field2: 'field2',field3: 'field3',field4: 'field4'}};
Normal way to access data such as arraydata.INPUTID.field1 is no problem
My problem arises when trying to access data when iterating over input fields in a form. Such as:
- $("input").each(function() {
- data=arraydata.THISID.field1';
THISID is of course the id of the actual input which corresponds to the INPUTID of the data. Can't find a solution, what should stand instead of THISID in the iteration?