Nested entities (objects with unique identifiers) will have only the id of the object populated. This is by design and is intended to save time/weight over the wire by not sending large amounts of redundant or useless information.
The nested entity is returned as an object rather than an ID for convenience. It's very common to populate nested entities in client process. ex: foreach trip in trips => trip.device = devices_lookup[trip.device.id].