i hope i can find help hier.
How can i get a full name form this array of Objects like this format : "Title" "LastName", "Name"??
selectsUsers = [
{
column: "Name",
value: "Martin",
gqlName:"TMP_name"
},
{
column: "Lastname",
value: "Anderson",
gqlName:"TMP_lastname"
},
{
column: "Title",
value: "Sir",
gqlName:"TMP_title"
},
];
I’m using a map and join methods to return the fullname from the object’s entries :
let pathView = this. selectsUsers
.map((item) => {
return _.get(this.obj, this.dtoName + "." + item.gqlName);
})
.join(", ");
What i go is this: "Martin, Anderson, Sir" What i want to achieve is this : "Sir Anderson, Martin"
i would be so thankfull if someone can help