title: Can json schema be used to validate based on input data
body: <p>I'm just wondering if it is possible to use json schema to do validation of input data BASED on the actual input data itself. </p>
  
  <p>Say I have an object: </p>
  
  <pre><code>{
  parts: {
      123: {
          happy: 'me'
      }
  },
  cells: [{
      part_id: 123,
      some: 'other property'
  }, {
      part_id: 124,
      some: 'thing else'
  }]
  }
  </code></pre>
  
  <p>Can I write a json schema that ensures that the part_id of the cell objects actually corresponds to one of the part objects passed in?</p>
  
  <p>In other words, <code>part_id: 123</code> would be acceptable, but <code>part_id: 124</code> wouldn't be.</p>
  
  <p>Thanks!</p>