Last active
August 29, 2015 14:23
-
-
Save trapatsas/bfeb81ff96cd114c759d to your computer and use it in GitHub Desktop.
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
var original = [ | |
{ | |
"createDate":"Jun 19, 2015 11:27:07 AM", | |
"flowName":"kostas", | |
"sumAmount":255750, | |
"charges":465 | |
},{ | |
"createDate":"Jun 19, 2015 11:27:07 AM", | |
"flowName":"alex", | |
"sumAmount":261288, | |
"charges":481 | |
} | |
] | |
var target = [ | |
["createDate", "flowName", "sumAmount", "charges"], | |
["Jun 19, 2015 11:27:07 AM", "kostas", 255750, 465], | |
["Jun 19, 2015 11:27:07 AM", "alex", 261288, 481] | |
] | |
// sample try with Underscore | |
var target = _.map(original, function(o){ return $.map(o, function(el) { return el; }); }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment