You need to override the toString method of the object -and give your object a "textual value"-.
You are getting "[object Object]" because the inherited Object.prototype.toString method is being executed, for example:
var cat = {
name: 'Kitten',
toString: function () {
return this.name + ' meow';
}
};
This own toString method will be executed when you make any implicit to string conversion (like when you concatenate a string to it), e.g.:
console.log(cat+' text'); // "Kitten meow text"
Note: If you mean by "textual value" a "string representation" of the object, (e.g. listing property/value pairs), your function will need to enumerate all the properties (using the for-in statement), but usually most of the time, that's done for debugging purposes, if that's the case, I would recommend you to get a debugger (like Firebug), and use the console.dir method.