B
B
bzotsss2021-07-11 17:55:19
JavaScript
bzotsss, 2021-07-11 17:55:19

How to check that the map collection contains two identical elements?

Hello everyone, can someone tell me how to check that the map collection contains two identical elements? For example, there is a collection map :

Map(4) {
'0' => { id: 1 },
'1' => { id: 2 },
'2' => { id: 3 },
'3' => { id: 1 }
}

How can I check that there are two identical emails in it. ? In this case, two objects with id : 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Aetae, 2021-07-11
@bzotsss

Cycle.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question