title: Accessing Mongoose Object fields and values
body: <p>I have a piece of my ticket schema structured as so - </p>
  
  <pre><code>ticketAssignment : [{
          isAssigned : {type: Boolean, default:false},
          assignee : {type: String, default: null}
      }]
  </code></pre>
  
  <p>when I console.log ticket.ticketAssignment[0] I receive the following - </p>
  
  <pre><code>{ isAssigned: true, assignee: '5ddc6e151c816d4154ab32d7' }
  </code></pre>
  
  <p>My question is how would I go about accessing just the individual fields i.e.</p>
  
  <pre><code>isAssigned: true
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>assignee: '5ddc6e151c816d4154ab32d7'
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>using <code>ticket.ticketAssignment[0].assignee</code> yields an error <code>Cannot read property 'assignee' of undefined</code> which is strange since the property of ticket.ticketAssignment[0] is defined before I try and access the assignee/isAssigned fields of the object.</p>
  
  <p>using <code>tickets[i].ticketAssignment[0]['assignee']</code> generates the exact same error.</p>