Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to parse hyphenated names #42

Open
JamesUoM opened this issue Aug 18, 2015 · 3 comments
Open

Unable to parse hyphenated names #42

JamesUoM opened this issue Aug 18, 2015 · 3 comments

Comments

@JamesUoM
Copy link

eg
{"search-results":{"searchTime":"1","total":"326","limit":"100","offset":"0","query":"oc_deleted:false AND oc_latest_version:true","result":[...] } }

~/bin/jsawk 'return this.search-results.results' < ~/a.json

jsawk: js error: ReferenceError: results is not defined

I've tried the usual JS handling of hyphenated words:

return ["this.search-results"] and this.["search-results"] etc without success

@ajs124
Copy link

ajs124 commented Sep 24, 2015

+1

@cyberhuman
Copy link

return this['search-results'].results? Works for me.

@MdeArcayne
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants