Javascript Create New Object From Existing Array In Python