Created
May 25, 2016 08:16
-
-
Save drawveloper/3604ecab4307bcba73be73326e928872 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 studentsByClass = _.groupBy(students, function (student) { return student.class }) | |
/* { | |
"A": [ | |
{ name: "John", grades: [7.0, 6.9, 8.0], class: "A" }, | |
{ name: "Paul", grades: [5.0, 8.7, 3.7], class: "A" } | |
], | |
"B": [ | |
{ name: "Luke", grades: [9.0, 8.2, 6.2], class: "B" }, | |
{ name: "Mark", grades: [6.0, 9.0, 8.4], class: "B" } | |
] | |
} */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment