Skip to content

Instantly share code, notes, and snippets.

@trapatsas
Last active August 29, 2015 14:23
Show Gist options
  • Save trapatsas/bfeb81ff96cd114c759d to your computer and use it in GitHub Desktop.
Save trapatsas/bfeb81ff96cd114c759d to your computer and use it in GitHub Desktop.
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