title: Reducing nested array
body: <p>I am receiving this JSON from my backend and i need to work out the count of "concrete_compressive_cylinder_100"'s where picked_up = false</p>
  
  <p>concrete_samples (can be multiple per work order) can be null ( key is always present )</p>
  
  <p>sample_specimens ( 1 per concrete_sample) can be null ( key is always present )</p>
  
  <p>concrete_compressive_cylinder_100 ( null to 500 per sample_specimens )</p>
  
  <pre><code>{ 
     "uuid":"4ad7bfe1-48d6-488c-bfaf-33f7189a41d7",
     "org_workorder_id":1000,
     "concrete_samples":[ 
        { 
           "uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
           "workorder_uuid":"4ad7bfe1-48d6-488c-bfaf-33f7189a41d7",
           "org_sample_id":5001,
           "sample_specimens":{ 
              "concrete_compressive_cylinder_100":[ 
                 { 
                    "uuid":"b9ef3a8a-2945-41e6-a34d-d90d1bd64819",
                    "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                    "picked_up":true
                 },
                 { 
                    "uuid":"d43f15b3-2208-43de-8fff-8d237c6918f9",
                    "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                    "picked_up":true
                 },
                 { 
                    "uuid":"472f832a-6f07-4af6-97ea-e6dc7b9b3799",
                    "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                    "picked_up":true
                 }
              ],
              "concrete_compressive_cylinder_200":[ 
                  { 
                     "uuid":"d659d058-e4ec-4f72-9d73-9ea98295715a",
                     "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                     "picked_up":true
                  },
                  { 
                     "uuid":"777372e0-3e58-4292-bae4-bec84dfe1402",
                     "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                     "picked_up":true
                  },
                  { 
                     "uuid":"f63f7102-7673-4e71-97e5-2d85e0c1a93d",
                     "sample_uuid":"776a8ccb-82fd-4a42-a6eb-8f286a4a9c0b",
                     "picked_up":true
                  }
               ]
           }
        },
        { 
           "uuid":"61138cf3-0c49-4495-8a89-533c0a6e50bc",
           "workorder_uuid":"4ad7bfe1-48d6-488c-bfaf-33f7189a41d7",
           "org_sample_id":5002,
           "sample_specimens":{ 
              "concrete_compressive_cylinder_100":null,
              "concrete_compressive_cylinder_200":null
           }
        }
     ]
  }
  </code></pre>
  
  <p>I've gotten this far but it dosen't really work and now im more confused some guidance would be great</p>
  
  <pre><code>        const out = res.data.concrete_samples.reduce((acc, sample) =&gt; {
            const { sample_specimens } = sample;
            const concrete_compressive_cylinder_100 = Object.keys(sample_specimens)["concrete_compressive_cylinder_100"];
  
              const specimens = concrete_compressive_cylinder_100.map(obj =&gt; {
                  obj.picked_up ? console.log("picked up") : console.log("Not pickedn up")
              });
  
          }, []);
  </code></pre>