title: React - creating checkboxes based on data from object
body: <p>I have a problem with implementing one of my ideas. Basically I want to create (in React) small app that:</p>
  
  <p>1) Takes data from object, for example:</p>
  
  <pre><code>const obj = {
      person1: {
          name: 'Jessica',
          age: 25
      },
      person2: {
          name: 'Kate',
          age: 27
      },
      person3: {
          name: 'Lisa',
          age: 29
      }
  };
  </code></pre>
  
  <p>But count of the attributes can be different than 3 (solution should be flexible).</p>
  
  <p>2) Creates checkboxes with labels (names from the obj).</p>
  
  <p>3) Has 2 buttons: one to check all of the checkboxes and second to deselect them. </p>
  
  <p>4) Shows age when one (or more) of the users are selected, hides when not.</p>
  
  <p>Seems like a simple thing to do, but I can't do it. First problem that I've encountered is how to iterate through object when creating checkboxes. forEach or map don't work. Any tips will be appreciated! Thanks in advance!</p>