Relative Content

Tag Archive for javascripthtmlreactjsarraysloops

How can I loop through array of objects and get result in key values form?

I have an array of objects as shown below. this is slightly complex but I will try to explain in simple way as I can. As you can see, each object with name Engineering, Environment and others has its radars object. this radars object has all object in it and it should have p1, p2, p3+ and total in it. if any of these are missing, that means its count is 0. for e.g. with Environment, the p1, and p2 are missing. that means its count is 0 and so on.

javascript – loop through array of objects and get result in key values form

I have an array of objects as shown below. this is slightly complex but I will try to explain in simple way as I can. As you can see, each object with name Engineering, Environment and others has its radars object. this radars object has all object in it and it should have p1, p2, p3+ and total in it. if any of these are missing, that means its count is 0. for e.g. with Environment, the p1, and p2 are missing. that means its count is 0 and so on.