I am unable to access any field in the following json file (someconfig.js) which starts with
window.table = {
config: getBootstrapConfig()
};
window.someConfig = {
header: {
rui: {
iframeUri: "header/header.html",
divId: "",
initFnName: ""
}
},
....
...
....
What did I try?
jq .header someconfig.js
parse error: Invalid numeric literal at line 1, column 14
jq .window.someConfig someconfig.js
parse error: Invalid numeric literal at line 2, column 0
I am new to jq and have also tried
jq .['header'] someconfig.js
jq: error: syntax error, unexpected INVALID_CHARACTER (Windows cmd shell quoting issues?) at <top-level>, line 1:
.['header']
jq: 1 compile error
However I am not able to understand how to fetch fields ex: divId, I want to see "". I also want to know what command would substitute divId ="" to divId = "abcd"