0
您好我有兩個哈希映射如下合併兩個多值包含HashMap基於價值
[AdGenres-b:key:[177], SongTitle:[What I've Done], ArtistName:[Linkin Park], MusicVideoRating:[TV-14], PlayId:[1367], AdGenres-b:value:[Rock], MusicVideoProvider:[Warner Music Group], AssetId:[91744]]
[AdGenres-b:key:[184], SongTitle:[What I've Done], ArtistName:[Linkin Park], MusicVideoRating:[TV-14], PlayId:[1367], AdGenres-b:value:[Rock - Alternative], MusicVideoProvider:[Warner Music Group], AssetId:[91744]]
我想結果地圖爲:
[AdGenres-b:key:[177, 184],SongTitle:[What I've Done], ArtistName:[Linkin Park], MusicVideoRating:[TV-14], PlayId:[1367], AdGenres-b:value:[Rock - Rock, Rock - Alternative], MusicVideoProvider:[Warner Music Group], AssetId:[91744]
如何才達到以上?
我剛纔看到你有一個奇怪的鍵。你不應該使用Map作爲另一張地圖的關鍵字,因爲關鍵字不應該是可變的。 –