JSON object, how to go through it with map, and I get the sums of exercises or others?

0
  00hJv4mzvqM3D9kBy3dfxoJyFV82: {
  intro: {
    totalDuration: 465,
    units: {
      01-introduction: {
        percent: 100,
        parts: {
          02-why-learn-to-code: {
            duration: 20,
            completed: 1,
            type: "read",
            completedAt: "2018-03-29T05:11:05.809Z"
          },
          01-growth-mindset: {
            type: "read",
            completedAt: "2018-03-29T05:08:45.105Z",
            duration: 20,
            completed: 1
          },
          00-welcome-and-orientation: {
            type: "read",
            completedAt: "2018-03-29T04:58:42.156Z",
            duration: 10,
            completed: 1
          },
          04-quiz: {
            score: 40,
            type: "quiz",
            completedAt: "2018-03-30T03:52:12.632Z",
            duration: 20,
            completed: 1
          },
          03-your-first-website: {
            type: "read",
            completedAt: "2018-03-29T05:21:08.998Z",
            duration: 20,
            completed: 1
          }
        },
        totalParts: 5,
        completedParts: 5,
        totalDuration: 90,
        completedDuration: 90
      },
      03-ux-design: {
        totalParts: 4,
        completedParts: 0,
        totalDuration: 90,
        completedDuration: 0,
        percent: 0,
        parts: {
          00-development-team: {
            duration: 15,
            completed: 0,
            type: "read"
          },
          02-ux-design-vs-ui-design: {
            duration: 30,
            completed: 0,
            type: "read"
          },
          01-ux-design: {
            duration: 15,
            completed: 0,
            type: "read"
          },
          03-quiz: {
            duration: 30,
            completed: 0,
            type: "quiz"
          }
        }
      },
      02-variables-and-data-types: {
        parts: {
          03-comments: {
            duration: 15,
            completed: 1,
            type: "read",
            completedAt: "2018-03-30T04:08:51.540Z"
          },
          06-exercises: {
            exercises: {
              01-coin-convert: {
                completed: 0
              },
              02-restaurant-bill: {
                completed: 0
              }
            },
            type: "practice",
            duration: 30,
            completed: 0
          },
          00-values-data-types-and-operators: {
            duration: 60,
            completed: 0,
            type: "read"
          },
          05-quiz: {
            score: 17,
            type: "quiz",
            completedAt: "2018-04-05T17:16:57.303Z",
            duration: 30,
            completed: 1
          },
          04-guided-exercises: {
            duration: 60,
            completed: 1,
            type: "practice",
            completedAt: "2018-04-05T17:13:22.380Z"
          },
          01-variables: {
            type: "read",
            duration: 60,
            completed: 0
          },
          02-self-learning-MDN: {
            type: "read",
            completedAt: "2018-03-30T04:17:59.539Z",
            duration: 30,
            completed: 1
          }
        },
        totalParts: 7,
        completedParts: 4,
        totalDuration: 285,
        completedDuration: 135,
        percent: 58
      }
    },
    completedUnits: 1.58,
    completedDuration: 225,
    totalUnits: 3,
    percent: 53
  }
}
    
asked by Angie Cortez 24.06.2018 в 06:28
source

0 answers