diff --git a/.datatables-commit-sync b/.datatables-commit-sync index ec1f0f7c..a11246af 100644 --- a/.datatables-commit-sync +++ b/.datatables-commit-sync @@ -1 +1 @@ -667ebcafa99f93bb2be04892ec8be75161a04921 +a3f57e46e1a0429dc63527ce1ea125925226eaa3 diff --git a/media/js/jquery.dataTables.js b/media/js/jquery.dataTables.js index 12aabd40..1646d7f1 100644 --- a/media/js/jquery.dataTables.js +++ b/media/js/jquery.dataTables.js @@ -2211,8 +2211,23 @@ // Convert to object based for 1.10+ if using the old scheme if ( data && data.__legacy ) { var tmp = {}; + var rbracket = /(.*?)\[\]$/; + $.each( data, function (key, val) { - tmp[val.name] = val.value; + var match = val.name.match(rbracket); + + if ( match ) { + // Support for arrays + var name = match[0]; + + if ( ! tmp[ name ] ) { + tmp[ name ] = []; + } + tmp[ name ].push( val.value ); + } + else { + tmp[val.name] = val.value; + } } ); data = tmp; }