Reading a single value in a https request's JSON response
<p>In my Angular I have code that requests a certain User and in that same function I want to catch the json result my server sends, and read one property of this json object.</p>

<p>Example Angular:</p>

<pre><code> $scope.CheckEmail = function () {
    $http.post("/FindUser", {"username": $scope.username})
        .success(function (data) {
            if (isEmpty(data))
                alert("No user Found");
            else
                if(data.email == $scope._id) 
                      alert("found correct user");
        });
}
</code></pre>

<p>Backend Code:</p>

<pre><code>app.post("/CheckEmail", function (req, res) {
   User.find({ "username": req.body.username }, function (err, us) {
       res.json(us);
    })
})
</code></pre>

<p>But <code>data.email</code>is undefined, please tell me how I can read a single field from this JSON response my anguler gets.</p>

<p>Added the screenshot of the console.log(data) here :</p>

<hr>

<p><a href="https://i.stack.imgur.com/zvY7D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zvY7D.png" alt="enter image description here"></a></p>