Avatar of YZlat
YZlat
Flag for United States of America asked on

How to display records while omitting repetitive fields in AngularJS

I have the following record I am retrieving from Web API:
    FullRecord
    _______
    RecordID
    RecordDate
    PersonName
    RecordNote
    LineOrder

Open in new window

The data comes from a Web API in JSON format.

The content is something like this:

    RecordID	RecordDate	PersonName	RecordNote	LineOrder
	1	        10/25/2016 	John Doe	test1		1
	1	        10/25/2016 	John Doe	test2		2
	1	        10/25/2016 	John Doe	test3		3
	2	        10/25/2016	Jane Doe    	testing23	1
	2	        10/25/2016	Jane Does	testing27	2

Open in new window


I am displaying it withi my AngularJS application as follows:

     <tbody>
              <tr ng-repeat="Record in Records">
                        <td>{{Record.RecordID}}</td>
                        <td>{{Record.RecordDate}}</td>
                        <td>{{Record.PersonName}}</td>
                        <td>{{Record.RecordNote}}</td>
                        <td>{{Record.LineOrder}}</td>
     		</tr>
     </tbody>

Open in new window


This way the first 3 fields are repeating for each record with the same record ID. I was wondering if I can somehow only display RecordID, RecordDate, and Person Name in a row if it is not repeating.

For example:
 
    RecordID	RecordDate	PersonName	RecordNote	LineOrder
	1	10/25/2016 	John Doe	test1		1
						                test2		2
						                test3		3
	2	10/25/2016	Jane Doe   	testing23	1
						                testing27	2

Open in new window


How can I accomplish that with Angular?
JSONAngular

Avatar of undefined
Last Comment
YZlat

8/22/2022 - Mon
SOLUTION
BigRat

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
leakim971

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Julian Hansen

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Julian Hansen

I prefer Leakim's solution - does not change the underlying recordset.
BigRat

That is true Julien, but I would have done this server side if I could.
YZlat

ASKER
Thank you! Worked perfectly
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes