Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Duration I have done yoga grouped by date.
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
You can’t perform that action at this time.