Primeng p-table – Show data instead of id

  angular, p-table, primeng, primeng-datatable

Is there a way in p-table to show the value instead of Id?

Eg: I get the data from server as below

[
   {row_id: 1, customer_id: 25, status: 'NEW'},
   {row_id: 1, customer_id: 26, status: 'NEW'},
]

I want to replace the customer id with customer name in the p-table with shows above data. I have the mapping of customer id to customer name as below

[
   {rowid: 25, name: 'Vinod'},
   {row_id: 26, name: 'Ram'}
]

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.