到目前为止,我过去将标准 JSON 转换为 CSV 没有问题jq
。但是现在我的数据变得复杂了。
主要的基本标签是account
和subaccount
。所有其他值都是变量。该条目year
具有可变值并经常随时间更改。这是我无法解决的任务。
这是输出
{
"jsonrpc": "2.0",
"result": {
"current": [{
"number": 171883808,
"commission": 10,
"year": [
[1999, 9224, 0],
[2000, 41919, 9224],
[2001, 162945, 41919],
[2002, 397993, 162945],
[2003, 751570, 397993],
[2004, 886466, 751570]
],
"status": true,
"last": 9782473,
"account": "VFUIJOPQW",
"subaccount": "BLPORDGS"
}, {
"number": 69999012,
"commission": 15,
"year": [
[2012, 97587, 0],
[2013, 472685, 97587],
[2014, 605963, 472685],
[2015, 698634, 605963],
[2016, 1931094, 1745922]
],
"status": true,
"last": 9782490,
"account": "VFUIJOXXX",
"subaccount": "BLPORXXX"
}],
"id": 1
}
}