converting javascript object to string

function objToString (obj) {
    var str = '';
    for (var p in obj) {
        if (obj.hasOwnProperty(p)) {
            str += p + '::' + obj[p] + '\n';
        }
    }
    return str;
}


About selvam4win

I am Selvam. I am very jolly person and frank one.

Posted on December 28, 2012, in javascript and tagged , . Bookmark the permalink. 1 Comment.

  1. We stumbled over here by a different web address and thought I might as
    well check things out. I like what I see
    so i am just following you. Look forward to checking out your web page repeatedly.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: