intersect
container intersect(container1, container2)
Returns a copy of container1 containing only the elements/keys also present in container2.
Parameters
- container1 — first container, either array or dictionary.
- container2 — second container of the same type as the first.
Returns
- a copy of container1 with the elements/keys both containers have in common.