Skip to content

Unable to parse hyphenated names #42

@JamesUoM

Description

@JamesUoM

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions