0

There is an array that contains arrays of objects.

Before

const data = [
  [{ a: "a" }, { b: "b" }, { c: "c" }],
  [{ d: "d" }, { e: "e" }, { f: "f" }],
  [{ g: "g" }, { h: "h" }, { i: "i" }],
];

Could you please suggest the way to convert it to this object?

After

const data = {
  a: "a",
  b: "b",
  c: "c",
  d: "d",
  e: "e",
  f: "f",
  g: "g",
  h: "h",
  i: "i",
};
Dev
  • 355
  • 1
  • 7
  • 24

0 Answers0