Like this: I have a json file with below format:
{
"Item": {
"summary": {
"B": "ABCDE"
},
"name": {
"S": "sider"
},
"age": {
"N": "1"
},
"data": {
"B": "abcde"
}
}
}
How can I get the object "Item" only using existed commands like sed/awk without installing any external tools in shell?
expected output:
{
"summary": {
"B": "ABCDE"
},
"name": {
"S": "sider"
},
"age": {
"N": "1"
},
"data": {
"B": "abcde"
}
}
sedorawk? Do you try to manipulate image files with onlysedorawk? Use the right tool for the job, and using line-oriented, regular-expression-based tools are not appropriate for a non-regular structured language like JSON.grep '^[[:space:]]' fileisn't all you need then edit your question to better specify your requirements and maybe also provide more truly representative sample input/output. Also add what you've tried so far.get the object "Item"? are you looking for any particular (output) format? or perhaps update the question with what you're expecting to see as the output? while we're at it, are you expecting all input to be nicely formatted as in your example?