Link to home
Start Free TrialLog in
Avatar of ksanjiv
ksanjiv

asked on

Sort records Ascending order of precedence

Hi experts,

I have two different objects, for example


Ob1...................................................................

Attribute      (row 1)          (row 2)      (row 3)
First name      tom      harry      tom
Last name      bob      bob      jhon
Occupation      se      se      me
Company      abc      xyz      pqr
Address      aaa      sss      ddd
City      ccc      ccc      bbc
Country      rrr      aaa      zzz


Ob2................................................................

Attribute      (row 4)      (row 5)         (row 6)
First name      tom      joe      tom
middle name      bob      bob      jhon
Address      aaa      sss      ddd
City      ccc      aam      ccc
state      rrr      aaa      zzz


Now I need sort all the six records in the following order (Ascending order of precedence)

First name
City


Can someone help me &
Avatar of Ajay-Singh
Ajay-Singh

Avatar of ksanjiv

ASKER

using Comparator i can compare only ... how will i sort the records .... can u write a sample code.... wud be helpful to me
ASKER CERTIFIED SOLUTION
Avatar of Ajay-Singh
Ajay-Singh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of contactkarthi
can you post the expected result.. like u want them in a single object or the values should be sorted and the be rearranged with 3 sets in each obbject
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Forced accept.

Computer101
EE Admin