`jsonwebtoken` - `decode` not readable in `Nodejs` api
<p>In my <code>MEAN</code> application, I am validating the username and password. later I am trying to get the user information to display in the web page. But I am not getting the data as readable.</p>

<p>I don't know the issue here and the wrong what i do. any one help me.</p>

<p>my response api is :</p>

<pre><code>apiRoute.get('/me', function(req, res) {
                res.send(req.decoded);
            })
</code></pre>

<p>from the <code>req.decoded</code> I am getting the result as :</p>

<pre><code>{
  "data": {
    "iat": 1474893984,
    "exp": 1474937184
  },
  "status": 200,
  "config": {
    "method": "GET",
    "transformRequest": [
      null
    ],
    "transformResponse": [
      null
    ],
    "cache": true,
    "url": "/api/me",
    "headers": {
      "Accept": "application/json, text/plain, */*",
      "x-access-token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NzQ4OTM5ODQsImV4cCI6MTQ3NDkzNzE4NH0._Qs2rTaH_oCAZ0c1LOe5oFiUVOZ9jXtpWc0fSykH4Xw"
    }
  },
  "statusText": "OK"
}
</code></pre>

<p>In the data, i am not getting the user name, instead of getting some num values.</p>

<p>here is how i am setting the <code>decode</code> when user logs in:</p>

<pre><code>apiRoute.use(function( req, res, next ) {

        var token = req.body.token || req.param('token') || req.headers['x-access-token'];

        if( token ) {

            jwt.verify( token, superSecret, function( err, decoded ) {

                if( err ) {

                    return res.status(403).send({
                        success: false,
                        message: 'Failed to authenticate token.'
                    });

                } else {
                    req.decoded = decoded; //setting the value on login.
                    next();

                }

            })

        } else {

            return res.status(403).send({
                success: false,
                message: 'No token provided.'
            });

        }

    })
</code></pre>

<p><strong>UPDATE</strong></p>

<p>As per <strong>hpavlino</strong> suggession i have updated my code, and I am getting this in console, if any one find the solution let me know:</p>

<pre><code>express deprecated req.param(name): Use req.params, req.body, or req.query instead app\routes\api.js:67:37
token is eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0NzQ5MDAzMDEsImV4cCI6MTQ3NDk4NjcwMX0.8gjrBcX6cD74pix1weqv06qoqw1xFcFHLoR3Mp2fUSE
Access token has expired
GET /api/me 200 19.364 ms - -
GET /app/views/pages/families.html 304 21.319 ms - -
GET /favicon.ico 304 5.999 ms - -
</code></pre>