You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何使用jq命令解析含哈希符号#的JSON键?

Extracting the Target Delivery Summary Object from Your JSON

Hey there! Let's pull out that specific delivery summary object you need from your JSON data. Here's how to do it easily:

First, let's look at your original JSON structure for context:

{ 
  "module": { 
    "data": { 
      "deliverySummary_200648721592191#address": { 
        "fields": { 
          "address": "MyAddress", 
          "consignee": "MyName", 
          "phone": "MyPhone", 
          "postCode": "", 
          "title": "Alamat Pengiriman \r\n" 
        }, 
        "id": "200648721592191#address", 
        "tag": "deliverySummary", 
        "type": "biz" 
      } 
    } 
  } 
}

The object you're after is nested under module.data with the key deliverySummary_200648721592191#address. Here's the extracted content you requested:

{ 
  "fields": { 
    "address": "MyAddress", 
    "consignee": "MyName", 
    "phone": "MyPhone", 
    "postCode": "", 
    "title": "Alamat Pengiriman \r\n" 
  }, 
  "id": "200648721592191#address", 
  "tag": "deliverySummary", 
  "type": "biz" 
}

If you're working with a programming language like JavaScript, you can access this object programmatically using bracket notation (since the key has special characters):

const originalJson = { /* your full JSON data here */ };
const extractedDeliverySummary = originalJson.module.data["deliverySummary_200648721592191#address"];

That will directly give you the exact object you're looking for.

内容的提问来源于stack exchange,提问作者Joe

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 07:35:13