我从命令中得到这种JSON
回复:curl
[
{
"cid": 49,
"pyn": "yi4",
"hans": "亿",
"hant": "億",
"tid": 68,
"l10n": "cent million",
"pid": 1,
"pos": "num",
"pos_txt": ""
},
{
"cid": 50,
"pyn": "yi4",
"hans": "亿",
"hant": "億",
"tid": 69,
"l10n": "100 millions",
"pid": 1,
"pos": "num",
"pos_txt": ""
}
]
如何2
使用Bash
或命令行(例如)计算数组中的项目数(此处underscore
)?