문제

After console.log(item) I got following object.

Object {_value: "106", _id: "opt_zXtP8TOfW2zteOgDIJQDI6Bxx3xSTkl5", _class: "selected", _selected: "selected"}

I want _value from this object. How can I do this?

I tried alert(item.value) but gets undefined

도움이 되었습니까?

해결책

You're ignoring the underscore. value and _value are not the same. You need to use:

item["_value"];

Or:

item._value;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top