Guest User

Untitled

a guest
Dec 12th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. "user": [
  2. {
  3. "name": "David",
  4. "currentProgram": "program1",
  5. "currentPhase": "C",
  6. "workout": [
  7. {
  8. "name": "Workoutname",
  9. "load": "10",
  10. "units": "kg"
  11. }
  12. ]
  13. },
  14. {
  15. "name": "Markus",
  16. "currentProgram": "program2",
  17. "currentPhase": "A",
  18. "workout": []
  19. }
  20. ]
  21.  
  22. "program": [
  23. {
  24. "name": "program1",
  25. "phases": [
  26. {
  27. "phase": "A",
  28. "cycle": [
  29. {
  30. "cycle": "day 1",
  31. "exercises": [
  32. {
  33. "name": "workout1",
  34. "set": 4,
  35. "repetitions": 8
  36. },
  37. {
  38. "name": "workout2",
  39. "set": 4,
  40. "repetitions": 8
  41. }
  42. ]
  43. }
  44. ]
  45. }
  46. ]
  47. }
  48. ]
  49.  
  50. var user = require('./user.json');
  51.  
  52. user.get("David").currentProgram = "program2";
  53. user.get("David").currentPhase = "A";
  54.  
  55. console.log(user.get("David"));
Add Comment
Please, Sign In to add comment