RsD0p9BK
7/10/2015 - 12:42 PM

GetFirstInObject.js

// Getting the first index of an object (associative array)

var obj = {a: 1, b: 2, c: 3};
Object.keys(obj)[0];

// http://stackoverflow.com/questions/909003/javascript-getting-the-first-index-of-an-object