I have an array of links:
array = [link1, link2, link3, link4]and array_of_hashes with two items: :names and :links
hash = { :names, :links } e.g.
array_of_hashes = [{ :names => name5, :links => link5}, {:names = name1, :links => link1}, ... ]
I want to do something with each pair of hashes (:names :links) from array_of_hashes which including links from the original array of links.
Thus, at final stage I need to find pair of hashes (in my case listed above):
{:names => name1, :links => link1}
cause link1 are listed in the array with links
UPD: Revised data... sorry for missunderstanding. Thanks a lot for your assistance.
array_of_hashesbased on whether thelinksvalue is present inarray?array_of_hashesbut containing only the links which are present inarray?