p-table Cols

UI Components for Angular
Post Reply
rod_dolpho
Posts: 1
Joined: 19 Aug 2019, 15:11

04 Sep 2019, 17:30

Hello, I have a p-table and I am using multiselect too. When I make a for to display my data in the table, everything works correctly. But some of the data I want to show in the table is not in the root of the json object.

Ex:

"users": [
{
"id_maquina": "5d6d09226eae4e000163f811",
"patrimonio": "NP2248895",
"status": {
"user": "01"
}
]

in order for the items to appear in my p table I call them in my ts in an array that has two properties, field and header. In the field when I want to call an item from the object I write the name of the object, but I have objects like "status.user", and I write in the field in my ts "status.user", p-table doesn't understand. What can I do to be able to access any part of the object? what should i write in the field field of my ts?

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests