The variable naming here is confusing.  You have two variables, both named `component`, but which are very different types (dict versus string).  Try this:

    for component in [step_hash['Component'] for step_hash in step.hashes]: