[removed] Getting a Single Property Name

前端 未结 5 1660
耶瑟儿~
耶瑟儿~ 2020-12-19 20:51

Given an object like this:

{ name: \"joe\" }

I want to get the value \"name\". I know I can use the for construct to iterate over the prope

5条回答
  •  时光说笑
    2020-12-19 21:11

    Why not iterate? It's just one step. I don't think you can get it in any other way. You can even break after the first step if it makes you feel better.

提交回复
热议问题