in reply to Data Structure confusion...

Welcome to the Monastery, Spoon71!

What you have there is an array of hashes (AoH), contained within an existing hash, referenced by a hostattributes key.

To help you create this structure, we'll need a small sample of your input data.