Today i was writing some code for an angular 2 project in was working on which was using ionic 2 and typescript.

to get the first key or property of an object, all i had to do is use this code

alert(Object.keys(objectName)[0]);

hope that helps