How can I merge multiple arrays into multiple separate objects?

I have an object that has multiple arrays that looks something like this.

let obj = { 
    links: ["", ""],
    IDs: ["yCmj", "4q1K"],

I want to make it so that it’s turned into an array of objects. Like the following.

let newObj = {
   templates: [
      {id:"yCmj", link: ""}, 
      {id:"4q1K", link: ""}

What I have tried:

I tried mapping the object values to a new array but the second map overwrites the whole array.

let templates = => ({id}))
templates = => ({thumbnailLink}))

let newObj = templates


The easiest way to accomplish this would be to pick either obj.links or obj.IDs and map their values to an object and use the index to locate the corresponding parallel value.

const obj = {
  links: ["", ""],
  IDs: ["yCmj", "4q1K"],

const newObj = {
  templates:, index) => (id => ({ id, link }))(obj.IDs[index]))

.as-console-wrapper { top: 0; max-height: 100% !important; }