changing model array fields flattening format to use square braces

This commit is contained in:
Danillo Corvalan de Barros 2015-04-02 08:28:39 -03:00
parent be32a91fad
commit 6a505fc250

View File

@ -125,7 +125,7 @@
var flatObject = this._flatten(obj[i]); var flatObject = this._flatten(obj[i]);
for (var x in flatObject) { for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue; if (!flatObject.hasOwnProperty(x)) continue;
output[i + '.' + x] = flatObject[x]; output['[' + i + '].[' + x + ']'] = flatObject[x];
} }
} else { } else {
output[i] = obj[i]; output[i] = obj[i];