If I have an object like this:
var item = {
id: '1',
description: 'something'
}
then how do I extract one of these values? If i do
alert($(item.id));
then I just get the message "Object object". I looked at this post: Getting the base element from a jQuery object and tried to call
alert($(item).get(0));
But with the same result.
Also, in terms of terminology, which objects are similar to this, so next time I can be more specific?
source
share