Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js get first object value

var obj = { first: 'someVal' };
obj[Object.keys(obj)[0]]; //returns 'someVal'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #object
ADD COMMENT
Topic
Name
1+4 =