in reply to joining words

when i print out my http request response using data dumper, this is the data structure
You don't show any code. This is not a good question.

This looks like a Homework question rather than a real world application.

Update: I see that you have once again updated your post without showing the edits. Don't do that.