Use correct names for key and value
Handle multidimensioned arrays properly
Merge pull request #2738 from wmtan/UseCollectNameForKeyAndValue

ROOT6 -- Use correct name for key and value