better-align icon indicating copy to clipboard operation
better-align copied to clipboard

Align properties across objects (table-like)

Open dami-i opened this issue 3 years ago • 0 comments

Is there a way to align properties across objects (same properties) to reach a table-like result, as follows?

const arrOfObj = [
  { propA: "first element",         propB: "value one",                  propC: "a"                   },
  { propA: "second element longer", propB: "value two",                  propC: "bee"                 },
  { propA: "third element",         propB: "value three is the longest", propC: "see they're aligned" },
];

dami-i avatar Jan 27 '22 18:01 dami-i