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
//dependency: underscore.js | |
_ = Underscore.load(); | |
/*function that allows generic grouping and filtering | |
args: | |
obj: json object like this: {"data":[{"dim1":"foo","dim2":"bar",...,"measure":n},...]} (required) | |
dims: array of dimensions (required) | |
measure: one measure (required) | |
order: ordered array of arrays like this: | |
[dimension or measure to order,true for ascending, false for descending] |