I guess you want to do:

```ruby
version = res.body.scan(version_key).flatten
```

here