probably using detect is better
e.g.

smartProxies.index.detect{|s| s['smart_proxy']['name'] == resource[:name] }