def [](key)
      if self.map? && @data.has_key?(key)
        @data[key]
      elsif (self.map?  && @data.has_value?(key)) ||
            (self.list? && @data.include?(key))
        key
      else
        nil
      end
    end
def [](key)
      if self.map? && @data.has_key?(key)
        @data[key]
      elsif (self.map?  && @data.has_value?(key)) ||
            (self.list? && @data.include?(key))
        key
      else
        nil
      end
    end
lookup collection value by a key