how to print an object containing multiple arrays inside a same element in react?

36 Views Asked by At

so here is an object

{
  can: ["a", "b", "c", "d"],
  votes: [12, 21, 30, 25]
}

and I want the result to be like this

candidate name vote-count

candidatte name vote-count

I tried different combinations of Object.keys() and Object.enttries() but none worked for me. it always gives

candidate name candidate name

vote-count vote-count

stackoverflow gave me duplicate but they all contain an array inside the main object. here I have values inside the object.

0

There are 0 best solutions below