Convert List To Dictionary Javascript