kasim mohamed

kasim mohamed

  • 1.7k
  • 56
  • 6.9k

Object array column position has to be change

Jul 30 2020 1:16 AM
Hi,
 I have an object array like below
{id: 1, name: "abc", comment: "a"},
{id: 2, name: "xyz", comment: "b"},
{id: 3, name: "axb", comment: "c"}
 
i need to bring the comment column as first one like below. how to achieve this in typescript? 
[
{comment: "a", id: 1, name: "abc"},
{comment: "b", id: 2, name: "xyz"},
{comment: "c", id: 3, name: "axb"}
]
 
Thanks 
 

Answers (1)