-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Description
As I understand, I can replace value via this command:
json -I -f test.json -e "this.name='andrew'"
But how can I replace a value for this key -> last.name?
I mean when I try to replace the value via this command
json -I -f test.json -e "this.last.name='andrew'"
I got:
undefined:3
this.last.name='andrew'
^
TypeError: Cannot set properties of undefined (setting 'name')
at Object.eval (eval at main (/usr/local/lib/node_modules/json/lib/json.js:1365:27), <anonymous>:3:15)
at parseChunk (/usr/local/lib/node_modules/json/lib/json.js:1569:29)
at /usr/local/lib/node_modules/json/lib/json.js:1426:13
at getInput (/usr/local/lib/node_modules/json/lib/json.js:738:17)
at main (/usr/local/lib/node_modules/json/lib/json.js:1396:9)
at Object.<anonymous> (/usr/local/lib/node_modules/json/lib/json.js:1764:5)
Metadata
Metadata
Assignees
Labels
No labels