title: Dynamic nested object prop validation - react
body: <p>I'm having trouble on working out a nice way to validate this structure</p>
  
  <p>I've seen suggestions on flattening data like this, but it seems like this is the best way to store this information, as it allows instant access via a item ID / a combo of item ID + store ID.</p>
  
  <p>The data looks like this</p>
  
  <pre><code>let data = {
      "itemid1" : {
          "store1" : {
              stockNow: 2,
              stockLater : 15,
              stockDate : "4 days"
          },
          "store2" : {
              stockNow : 2,
              stockLater : 10,
              stockDate : "4 days"
          },
          "store3" : {
              stockNow : 4,
              stockLater : 15,
              stockDate : "4 days"
          },
      },
      "itemid2" : {
          "store1" : {
              stockNow: 2,
              stockLater : 15,
              stockDate : "4 days"
          },
          "store2" : {
              stockNow : 2,
              stockLater : 10,
              stockDate : "4 days"
          },
          "store3" : {
              stockNow : 4,
              stockLater : 15,
              stockDate : "4 days"
          },
      }
  }
  </code></pre>