如何使用jQuery获取多维数组名称是否存在于数组中

时间:2019-05-22 07:06:05

标签: php jquery json

我有一个数组,其中两个对象都有数组 crdet {}和tfdet {[]}。
如何使用test2获取数组?

[
  {
    "crdet": {
      "cid": "1",
      "tracking": "GNS-1000000",
      "cons_no": "1000000",
      "letra": "GNS",
      "ship_name": "12 - DEEPIKA",
      "phone": "918967452345",
      "s_add": "PATHANAMTHITTA K P ROAD",
      "cc": "",
      "locker": "100009",
      "correo": "ALUK@GMAIL.COM",
      "rev_name": "sx",
      "r_phone": "",
      "telefono1": "",
      "r_add": "kgh opp",
      "cc_r": "",
      "email": "test@gmail.com",
      "type": "Parcel",
      "weight": "",
      "variable": "",
      "kiloadicional": "",
      "shipping_subtotal": "",
      "altura": "0",
      "ancho": "",
      "longitud": "",
      "totalpeso": "",
      "invice_no": "delhi branch",
      "qty": "2",
      "book_mode": "Debit_card",
      "declarate": "",
      "declarado": "",
      "freight": "",
      "mode": "GN Super",
      "pick_date": "05/22/2019",
      "schedule": "05/24/2019",
      "pick_time": "India",
      "iso": "IN",
      "state": "Kerala",
      "ciudad": "Allappuzha (Alleppey)",
      "zipcode": "2345678",
      "paisdestino": "India",
      "iso1": "",
      "state1": "Andhra Pradesh",
      "city1": "Visakhapatnam",
      "zipcode1": "530041",
      "status": "forwarded",
      "comments": "dcfdfv",
      "book_date": "2019-05-22",
      "payment": null,
      "paymode": null,
      "status_delivered": "",
      "officename": "Employee",
      "user": "delbch",
      "pesoreal": "1232",
      "rate": "3242",
      "actual_rate": "",
      "gst": "",
      "actual_wt": "213",
      "gns": "GNS-1000000",
      "consignee": null,
      "recieved_by": null,
      "cash": "0",
      "credit": "0",
      "scharge": "",
      "gtotal": "3242",
      "bstat": "0",
      "fhub": "bch",
      "ebay_no": "",
      "ebay_date": "0000-00-00",
      "amt_type": ""
    },
    "tfdet": [
      {
        "f_hub": "delhi branch/bch",
        "t_hub": "Asola Branch/bch",
        "tf_date": "2019-05-22"
      }
    ]
  }
]

0 个答案:

没有答案