gkz / grasp

JavaScript structural search, replace, and refactor
http://graspjs.com
MIT License
1.28k stars 33 forks source link

Question: get property of a object #20

Closed tianyagongcishi closed 10 years ago

tianyagongcishi commented 10 years ago

hello, i have a object,like this: var user = { hobby:['sing', 'tour'] } var outerArray=['sing', 'game'];

how can i get the 'sing' in the user's hobby property array? not the outerArray's

gkz commented 10 years ago

grasp 'prop[key=#hobby] "sing"'

tianyagongcishi commented 10 years ago

tks