Ok so let\'s say that I have my object
myobj = {\"A\":[\"Abe\"], \"B\":[\"Bob\"]}
and I want to get the first element out of it. As in I want i
JS objects have no defined order, they are (by definition) an unsorted set of key-value pairs.
If by "first" you mean "first in lexicographical order", you can however use:
var sortedKeys = Object.keys(myobj).sort();
and then use:
var first = myobj[sortedKeys[0]];