Created
June 17, 2015 18:35
-
-
Save naveensrinivasan/213c2092babc23d7c772 to your computer and use it in GitHub Desktop.
Duration I have done yoga grouped by date.
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 items = JsonConvert.DeserializeObject<PraticeHistory>(result); | |
items.history.Select (h => new { WatchedDate =epoch.AddSeconds( h.date_watched_timestamp).ToLocalTime(), | |
h.video.category, Duration = Convert.ToInt32( h.video.durationMin), h.video.level, h.video.short_description, | |
h.video.style, h.video.title }) | |
.GroupBy (h => h.WatchedDate.ToShortDateString()) | |
.Select (h => new {h.Key, Duration = h.Select (x => x.Duration)}) | |
.Aggregate ((x,y) => x+y)} ) | |
.Dump(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment