I want to access the values of the keys of an object?
<p>I'm using an API and I'm getting the response of it on success function as a data.</p>

<p>I'm trying to use which only gives me the "keys" of all objects but not there values, so my question is: can I get the values using below approach?</p>

<p>I have got the "keys" of all objects using JavaScript's <code>object.key()</code> method but now I want to get their values too.</p>

<p>Here is the response. I have taken a snippet of response here which I got in console.</p>

<pre><code>division: Object
active: 1
country: "United States"
lat: 42.3584647
lon: -71.05962
name: "Boston"
url: "http://yipit.com/boston/"
</code></pre>

<p>Below the function written to get the key of an object:</p>

<pre><code>function getvalues(data){
    for(var i = 0;i &lt;= data.response.deals.length-1; i++){
        var obj = [];
        var num = i + 1;
        var keyArray = Object.keys(data.response.deals[i].division);
        $('#empid h6').html(keyArray);
        //here i get the keys of objects which is country,lat,lon etc.
        console.log("value of keyArray "+num+" is "+keyArray);
    }    
}
</code></pre>
