- Forums
- Angular
- Get The First Property In An Object - Javascript Angular Typescript
this is an example code on how to retrieve the first property in an object in javascript angular 2 typescript [4699], Last Updated: Mon Jun 24, 2024
Angular2
Wed Jun 14, 2017
0 Comments
663 Visits
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