how to catch object key inside array
<p>I'm using <code>Object.keys()</code> to fetch the object key while iterating the parent array as shown below. I was wondering if there are other ways to capture the object key if I know that there will be only one. <code>arrOfObjs[i][keyArr[0]]</code> gives me a headache.</p>

<pre><code>var arrOfObjs = [
    {"key1":"val1"},
    {"key2":"val2"},
    {"key3":"val3"},    
]
for(var i in arrOfObjs){
    var keyArr = Object.keys(arrOfObjs[i]);
    console.log(keyArr[0], arrOfObjs[i][keyArr[0]]);
}
</code></pre>