Created
January 28, 2020 07:20
-
-
Save maxwindiff/6eff975a14386fe4dcafdc91f1304400 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ jq '.[] | . as $parent | .cities[] | $parent.provinceName + "," + .cityName + "," + (.confirmedCount | tostring)' | |
[ | |
{ | |
"provinceName": "Guangdong", | |
"cities": [ | |
{ | |
"cityName": "Guangzhou", | |
"confirmedCount": 10 | |
}, | |
{ | |
"cityName": "Shenzhen", | |
"confirmedCount": 20 | |
} | |
] | |
}, | |
{ | |
"provinceName": "Hubei", | |
"cities": [ | |
{ | |
"cityName": "Wuhan", | |
"confirmedCount": 30 | |
} | |
] | |
} | |
] | |
"Guangdong,Guangzhou,10" | |
"Guangdong,Shenzhen,20" | |
"Hubei,Wuhan,30" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment