Akhilesh Pandit

Akhilesh Pandit

  • NA
  • 772
  • 454.4k

Group by and filter in jquery

Nov 24 2016 9:53 AM
Hi All
I have json like 
abcArr = [[FirstName:"A",LastName:"B",FullName:"AB",Email:"[email protected]"],
[FirstName:"A",LastName:"B",FullName:"AB",Email:"[email protected]"],
[FirstName:"C",LastName:"D",FullName:"CD",Email:"[email protected]"]]
and i want out put like this 
OUTPUT [[[FirstName:"A",LastName:"B",FullName:"[email protected]",Email:"[email protected]"],
[FirstName:"A",LastName:"B",FullName:"[email protected]",Email:"[email protected]"],
[FirstName:"C",LastName:"D",FullName:"CD",Email:"[email protected]"]]
 
in this array if group by on firstname and lastname and there count greater than 0 then email id added with firtname and last name and make full name and if count equal to 0 then emailid not aaded to fullname
 

Answers (1)