Open GeekTantra opened 12 years ago
this still happens when when you have only one subelemnt,
testitem[testproperty] will not create a name property as testproperty: testpropertyvalue it is returned just the testpropertyvalue. Assuming the user has entered testpropertyvalue in the form for testproperty.
I'd add the following line to get Rails style arrays working.
name = name.replace(/\[([a-zA-Z_]*)\]/g, delimiter + '$1');
Add it below these lines around line number 98
value = nameValues[i].value;
if (skipEmpty && (value === '' || value === null)) continue;
name = nameValues[i].name;
name = name.replace(/\[([a-zA-Z_]*)\]/g, delimiter + '$1');
This works fine.
Ruby style arrays are not working for level 1 type arrays as follows:
testitem[test_property]
But it works for:
test.item[testproperty]
I guess the error is in
line 103
and
line 120