Javascript Filter Out Object From Array To Hashmap In Python