title: How to test value of a single field in a JSON object with RSpec
body: <p>I am trying to use RSpec with the gem Airborne to test the value of a field in a JSON response of 'people' objects from an API.</p>
  
  <p>Code:</p>
  
  <pre><code>  it 'GET list of people objects where gender = male' do
      get "/people?gender=male"
      expect_json('people.*', {gender: 'MALE'})
    end
  </code></pre>
  
  <p>So if my test makes an API call with this particular filter (gender), I expect to only pull back people with gender of male.  However this code fails, because every 'person' object has many different keys (:name, :age, etc.).  I ONLY want to test the gender, but I am unable to get it to pass because expect_json is expecting ALL of the keys in people to be written into the test.</p>
  
  <p>I have combed through Google/Airborne documentation but to no avail:
  <a href="https://github.com/brooklynDev/airborne" rel="nofollow">https://github.com/brooklynDev/airborne</a></p>