Getting value from object in javascript

前端 未结 1 1752
余生分开走
余生分开走 2021-01-07 13:59

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

Object {_value: \"106\", _id: \"opt_zXtP8TOfW2zteOgDIJQDI6Bxx3xSTkl5\", _class: \"selected\", _         


        
相关标签:
1条回答
  • 2021-01-07 14:51

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

    item["_value"];
    

    Or:

    item._value;
    
    0 讨论(0)
提交回复
热议问题