def find_value(data, path)
      return (path.nil? or data.nil?) ? nil :
          path.split('.').inject(data) do |node, section|
            break if node.nil?
            key = section.to_sym
            (node.is_a?(Hash) and node.include?(key)) ? node[key] : nil
          end
    end
def find_value(data, path)
      return (path.nil? or data.nil?) ? nil :
          path.split('.').inject(data) do |node, section|
            break if node.nil?
            key = section.to_sym
            (node.is_a?(Hash) and node.include?(key)) ? node[key] : nil
          end
    end
def find_value ( data , path ) return ( path . nil? or data . nil? ) ? nil : path . split ( '.' ) . inject ( data ) do | node , section | break if node . nil? key = section . to_sym ( node . is_a? ( Hash ) and node . include? ( key ) ) ? node [ key ] : nil end end
Finds a value for string of format 'level1.level2.name' in a given hash.
Finds a value for string of format level1 . level2 . name in a given hash .