If you have the time, try with this one, it may work and is more elegant
```ruby
Team.last.as_json(include: :players)
```