Why eq(0) returns an array AND no attributes property?

Why eq(0) returns an array AND no attributes property?

I'm using this function to get the first jquery object:
  1. function getfirst(selector)
  2. {
  3.  var selected = $(selector).eq(0);
  4.  return selected;
  5. }
This works for me almost everywhere. It returns an jquery object which has "attributes" property.(And so many other properties). The attributes can be enumerated
When I want to get an object of table using an 'id' like this:
  1. getfirst('#tableMain');
It returns an object has property "0" "length" and "prevObject".   It doen't have "attributes" object.
property "0" is a DOM object. I've tried $(xxx[0]) to convert it to jquery object  again. It works well, but I still get the same object. 
  1. //console test result
  2. obj[0];  //DOM object
  3. obj.length=1; 
  4. obj.attributed === undefined;
  5. obj.attr('id') == '#tableMain';   //it works well, and returns the correct id
  6. obj.id== undefined;

What's wrong with it? Is it because I'm using datatable plugin? how to resolve it ?