WarWithinMe/better-align

Align properties across objects (table-like)

dami-i opened this issue · 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" },
];