Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70924

Remove Duplicate from array object

$
0
0

@dipankar123 wrote:

Hi guys,
I have a array like this:

test = [{ 'id': '1231', 'value': '111111' },
  { 'id': '1232', 'value': '111111' },
  { 'id': '1233', 'value': '21121' },
  { 'id': '1234', 'value': '22222' },
  { 'id': '1235', 'value': '555555' },
  { 'id': '1236', 'value': '555555' },
  ]

it has duplicate object
i want to remove these duplicates from test array.
want new array like this:

newArray= [{ 'id': '1231', 'value': '111111' },
  { 'id': '1233', 'value': '21121' },
  { 'id': '1234', 'value': '22222' },
  { 'id': '1235', 'value': '555555' },
  ]

please, guys, help
thanks

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70924

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>