use for each to get each input value [on hold]

I'm expecting value 1 and 2 but it returned null instead. Any idea why is this happening?

$(function() {

  $('.agent_rows').each(function() {
    console.log($(this).find('input[name="associatedAgentId"]').val())
  })

});
<script src="http://ift.tt/1oMJErh"></script>
<div class="agent_rows">
  <input type="hidden" name="associatedAgentId" val="1">
</div>

<div class="agent_rows">
  <input type="hidden" name="associatedAgentId" val="2">
</div>

Click here view more answers http://ift.tt/1ks1O2R