{
"response_code": "100",
"total_orders": "302",
"order_ids": "930777,930783,930788,930791,930793",
"data": {
"930777": {
"response_code": "100",
"acquisition_date": "2017-04-07 00:06:29",
"ancestor_id": "930777",
"affiliate": "1038"
},
"930783": {
"response_code": "100",
"acquisition_date": "2017-04-07 00:07:59",
"ancestor_id": "930783",
"affiliate": "1040"
},
"930788": {
"response_code": "100",
"acquisition_date": "2017-04-07 00:17:04",
"ancestor_id": "930788",
"affiliate": "1038"
},
"930791": {
"response_code": "100",
"acquisition_date": "2017-04-07 00:20:31",
"ancestor_id": "930791",
"affiliate": "1030"
},
"930793": {
"response_code": "100",
"acquisition_date": "2017-04-07 00:24:34",
"ancestor_id": "930793",
"affiliate": "1038"
}
}
}
嗨我從API調用了上面返回的JSON。我想知道什麼是最好的方法來計算子公司。我想得到的結果如下:在嵌套JSON中計算唯一值
Affiliate | Number
1038 | 3
1040 | 1
1030 | 1
有時候返回API可能有多達4000條記錄。我認爲必須有能夠在很短的時間完成這項工作
感謝圖書館
感謝你它的工作原理 –