daily pastebin goal
83%
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [{
  2.                 _id: ObjectId(<some mongo default encoded id>),
  3.             user: 44,
  4.     event_group: 1,
  5.                 events: [
  6.                 {event: "event name", current_points:1, date: ISO(2017-05-11 21:00:45.774Z)},
  7.                 {event: "event name1", current_points:1, date: ISO(2017-05-11 22:15:45.774Z)},
  8.                 {event: "event name2", current_points:2, date: ISO(2017-05-11 22:10:55.774Z)},
  9.                 {event: "event name3", current_points:5, date: ISO(2017-05-12 23:00:45.774Z)},
  10.                 {event: "event name4", current_points:6, date: ISO(2017-05-12 21:00:45.774Z)},
  11.                 {event: "event name5", current_points:9, date: ISO(2017-05-14 22:15:45.774Z)},
  12.                 {event: "event name6", current_points:11, date: ISO(2017-05-14 22:10:55.774Z)},
  13.                 ]
  14.               }];
  15.  
  16.     [{
  17.                 _id: ObjectId(<some mongo default encoded id>),
  18.             user: 44,
  19.     event_group: 2,
  20.                 events: [
  21.                 {event: "event name", current_points:0, date: ISO(2017-05-11 21:00:45.774Z)},
  22.                 {event: "event name1", current_points:2, date: ISO(2017-05-11 22:15:45.774Z)},
  23.                 {event: "event name2", current_points:5, date: ISO(2017-05-11 22:10:55.774Z)},
  24.                 {event: "event name3", current_points:7, date: ISO(2017-05-12 23:00:45.774Z)},
  25.                 {event: "event name4", current_points:10, date: ISO(2017-05-12 21:00:45.774Z)},
  26.                 {event: "event name5", current_points:18, date: ISO(2017-05-14 22:15:45.774Z)},
  27.                 {event: "event name6", current_points:30, date: ISO(2017-05-14 22:10:55.774Z)},
  28.                 ]
  29.               }];
  30.  
  31.     [{
  32.                 _id: ObjectId(<some mongo default encoded id>),
  33.             user: 44,
  34.     event_group: 3,
  35.                 events: [
  36.                 {event: "event name", current_points:0, date: ISO(2017-05-11 21:00:45.774Z)},
  37.                 {event: "event name1", current_points:4, date: ISO(2017-05-11 22:15:45.774Z)},
  38.                 {event: "event name2", current_points:5, date: ISO(2017-05-11 22:10:55.774Z)},
  39.                 {event: "event name3", current_points:7, date: ISO(2017-05-12 23:00:45.774Z)},
  40.                 {event: "event name4", current_points:10, date: ISO(2017-05-12 21:00:45.774Z)},
  41.                 {event: "event name5", current_points:15, date: ISO(2017-05-14 22:15:45.774Z)},
  42.                 {event: "event name6", current_points:25, date: ISO(2017-05-14 22:10:55.774Z)},
  43.                 ]
  44.               }];
  45.  
  46.  
  47.    [{
  48.                 _id: ObjectId(<some mongo default encoded id>),
  49.             user: 45,
  50.     event_group: 1,
  51.                 events: [
  52.                 {event: "event name", current_points:1, date: ISO(2017-05-11 21:00:45.774Z)},
  53.                 {event: "event name1", current_points:1, date: ISO(2017-05-11 22:15:45.774Z)},
  54.                 {event: "event name2", current_points:2, date: ISO(2017-05-11 22:10:55.774Z)},
  55.                 {event: "event name3", current_points:5, date: ISO(2017-05-12 23:00:45.774Z)},
  56.                 {event: "event name4", current_points:6, date: ISO(2017-05-12 21:00:45.774Z)},
  57.                 {event: "event name5", current_points:9, date: ISO(2017-05-14 22:15:45.774Z)},
  58.                 {event: "event name6", current_points:11, date: ISO(2017-05-14 22:10:55.774Z)},
  59.                 ]
  60.               }];
  61.  
  62.     [{
  63.                 _id: ObjectId(<some mongo default encoded id>),
  64.             user: 45,
  65.     event_group: 2,
  66.                 events: [
  67.                 {event: "event name", current_points:0, date: ISO(2017-05-11 21:00:45.774Z)},
  68.                 {event: "event name1", current_points:2, date: ISO(2017-05-11 22:15:45.774Z)},
  69.                 {event: "event name2", current_points:5, date: ISO(2017-05-11 22:10:55.774Z)},
  70.                 {event: "event name3", current_points:7, date: ISO(2017-05-12 23:00:45.774Z)},
  71.                 {event: "event name4", current_points:10, date: ISO(2017-05-12 21:00:45.774Z)},
  72.                 {event: "event name5", current_points:18, date: ISO(2017-05-14 22:15:45.774Z)},
  73.                 {event: "event name6", current_points:30, date: ISO(2017-05-14 22:10:55.774Z)},
  74.                 ]
  75.               }];
  76.  
  77.     [{
  78.                 _id: ObjectId(<some mongo default encoded id>),
  79.             user: 46,
  80.     event_group: 3,
  81.                 events: [
  82.                 {event: "event name", current_points:0, date: ISO(2017-05-11 21:00:45.774Z)},
  83.                 {event: "event name1", current_points:4, date: ISO(2017-05-11 22:15:45.774Z)},
  84.                 {event: "event name2", current_points:5, date: ISO(2017-05-11 22:10:55.774Z)},
  85.                 {event: "event name3", current_points:7, date: ISO(2017-05-12 23:00:45.774Z)},
  86.                 {event: "event name4", current_points:10, date: ISO(2017-05-12 21:00:45.774Z)},
  87.                 {event: "event name5", current_points:15, date: ISO(2017-05-14 22:15:45.774Z)},
  88.                 {event: "event name6", current_points:25, date: ISO(2017-05-14 22:10:55.774Z)},
  89.                 ]
  90.               }];
  91.    
  92. [{
  93. user: 45,
  94. current_points: 41    // sum of event_group 1 & 2
  95. },
  96. {
  97. user: 44,
  98. current_points: 25
  99. }]
RAW Paste Data
Top