title: Get an array of items from an object- typescript
body: <p>I have an object with the below structure:</p>
  <pre><code>  Order: [
      {
        id: '001',
        type: '',
        status: '',
        users: [
          {
            OrderId:'001', 
            userId: 'String',
            user: {
              email: 'string',
              givenName: 'Name',
              lastName: 'LastName',
              phone: 'string',
            },
          },
        ],
    
      },
  </code></pre>
  <p>the order is of type Order[] and users of type UserData[]</p>
  <pre><code>  type Order
    @model
    @key(fields: [&quot;organizationId&quot;, &quot;id&quot;])
    @auth(
      rules: []
    ) {
    id: ID!
    type: OrderType
    status: OrderStatus
  
    userConnections: [UserOrderConnection] @connection(keyName: &quot;byOrder&quot;, fields: [&quot;id&quot;])
  
    organizationId: ID!
  }
  
  type UserOrderConnection
    @model
    @key(fields: [&quot;organizationId&quot;, &quot;id&quot;])
    @key(name: &quot;Order&quot;, fields: [&quot;OrderId&quot;], queryField: &quot;userOrderByOrder&quot;)
    @auth(
      rules: []
    ) {
    id: ID!
    accepted: Boolean
    OrderId: ID!
    Order: Order @connection(fields: [&quot;organizationId&quot;, &quot;id&quot;])
    userId: ID!
    user: UserData
  }
  </code></pre>
  <p>Whenever I try to get the list of users per order :</p>
  <p><code>let users = this.Order.users</code></p>
  <p>it says that: users don't exist on type Order[], can anyone explain for me why.</p>