Javascript Map Array Of Objects To Dictionary