This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* function returns subform as 2D array | |
* @param {object} r valid JSON object | |
* @param {int} n integer greater than 1 | |
* @return {object} 2D array where number of objects per row is equal to n | |
*/ | |
function subform_to_multi_array(r,n) { | |
if(typeof n !== 'number' || n !== Math.floor(n) || n <= 1 || n > r.length) return r; | |
var cols = []; | |
var count = 0; |