Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options answers only user 168016

JSON (JavaScript Object Notation) is a lightweight data representation format that resembles JavaScript source and that is can be easily red by machines and edited by humans with some effort.

3
votes
You shouldn't parse JSON data with text oriented parser like sed. Instead use a JSON aware parser like jq. If this tool is available on your system, you could simple do: jq '.user |= gsub(".";"X …
answered Oct 19 '18 by oliv
2
votes
You can use this jq filter: <file jq 'to_entries|map(.value + {family:(.key)})[]' As you found out, the to_entries function allows to get the key name in order add the property family. So the filt …
answered Nov 14 '18 by oliv
6
votes
Using jq based on the walk function (needs a recent version): jq 'walk(.name?="XXX")' file If your jq doesn't support the walk function, just define it as: jq ' # Apply f to composite entities r …
answered Oct 19 '18 by oliv
6
votes
If your jq has the inputs function, and assuming {#PROCNAME} is just a string, you can use the following: ps axho comm --sort -rss | head -5 | jq -Rn '{data: [inputs|{"#PROCNAME":.}]}' The inputs f …
answered Feb 26 by oliv
5
votes
I would advise to avoid parsing JSON data using text oriented tool like awk or sed, etc... Instead use a JSON parser or a language that relies on a JSON library like perl, python, etc.. Here is an …
answered Oct 10 '18 by oliv