def drill_down_structured(value, ref)
      # Nothing to do unless nxapi_structured
      return value unless ref.hash['drill_down']

      row_key = ref.hash['get_value'][0][/^\S+/]

      # Escape special characters if any in row_index and add
      # anchors for exact match.
      row_index = Regexp.escape(ref.hash['get_value'][0][/\S+$/])
      row_index = "^#{row_index}$"

      data_key = ref.hash['get_value'][1]
      regexp_filter = nil
      if ref.hash['get_value'][2]
        regexp_filter = Regexp.new ref.hash['get_value'][2][1..-2]
      end
      # Get the value using the row_key, row_index and data_key
      value = value.is_a?(Hash) ? [value] : value
      data = nil
      value.each do |row|
        if row[row_key].to_s[/#{row_index}/]
          data = row[data_key]
          data = data.nil? ? '' : data
        end
      end
      return value if data.nil?
      if regexp_filter
        filtered = regexp_filter.match(data)
        return filtered.nil? ? filtered : filtered[filtered.size - 1]
      end
      data
    end
def drill_down_structured(value, ref)
      # Nothing to do unless nxapi_structured
      return value unless ref.hash['drill_down']

      row_key = ref.hash['get_value'][0][/^\S+/]

      # Escape special characters if any in row_index and add
      # anchors for exact match.
      row_index = Regexp.escape(ref.hash['get_value'][0][/\S+$/])
      row_index = "^#{row_index}$"

      data_key = ref.hash['get_value'][1]
      regexp_filter = nil
      if ref.hash['get_value'][2]
        regexp_filter = Regexp.new ref.hash['get_value'][2][1..-2]
      end
      # Get the value using the row_key, row_index and data_key
      value = value.is_a?(Hash) ? [value] : value
      data = nil
      value.each do |row|
        if row[row_key].to_s[/#{row_index}/]
          data = row[data_key]
          data = data.nil? ? '' : data
        end
      end
      return value if data.nil?
      if regexp_filter
        filtered = regexp_filter.match(data)
        return filtered.nil? ? filtered : filtered[filtered.size - 1]
      end
      data
    end
Drill down into structured nxapi table data and return value from the
 row specified by a two part key.

 Example: Get vlanshowbr-vlanname in the row that contains vlan id 1000
 "get_value"=>["vlanshowbr-vlanid-utf 1000", "vlanshowbr-vlanname"]
 Example with optional regexp match
 "get_value"=>["vlanshowbr-vlanid-utf 1000", "vlanshowbr-vlanname",
                '/^shutdown$/']