我想使用 npm 包中的 JSON 路徑查找器在下面給定的 json 檔案中獲取一些動態 id。
示例.json
[
{
"4787843417861749370": [
{
"type": "Fast delivery",
"subtype": "verizon",
"status": "Dispatched",
"reason": "null",
"currency_code": "USD"
}
],
"1502698381711920904": [
{
"type": "Normal delivery",
"subtype": "Cisco fiber",
"status": "Added Cart",
"reason": "null",
"currency_code": "USD"
}
]
}
]
輸出(以下是來自上述示例的動態 id.json 檔案):
[4787843417861749370,1502698381711920904]
我有類似型別的 json 檔案,其中包含 n 個動態 id 作為 JSON 子陣列。有人可以像上面那樣幫我從 json 檔案中獲取所有這些動態陣列嗎?
uj5u.com熱心網友回復:
您可以使用
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/490737.html
