用奇怪的格式索引嵌套的JSON数组

时间:2019-06-08 11:08:32

标签: arrays json

我的JSON数据通过API调用返回:

{
  "edit_date": "2019-05-27 15:50:03",
  "active": 1,
  "form_uuid": "e5ae0a15-3914-4e1d-a356-6490369c5d0b",
  "staff_uuid": "",
  "regarding_object": "job",
  "regarding_object_uuid": "22ce9784-8f03-45dc-9d4b-c62a85fb2adb",
  "field_data": "[{\"FieldType\":\"Multiple Choice\",\"Question\":\"Retest In\",\"Response\":\"6 Months\",\"UUID\":\"113fc0c0-6d6d-443e-970d-4fc6ea9044c1\",\"SortOrder\":10},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Insulation Resistance\",\"Response\":\"Pass\",\"UUID\":\"63100366-0dc8-4787-805e-db8a2a90b07b\",\"SortOrder\":5},{\"FieldType\":\"Multiple Choice\",\"Question\":\"PAT Result\",\"Response\":\"Pass\",\"UUID\":\"9f9ed288-c56d-4b39-88dc-a1a9941c65ab\",\"SortOrder\":9},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Condition\",\"Response\":\"Good\",\"UUID\":\"d6f0c0d8-7935-4292-8d79-38e4bf70454b\",\"SortOrder\":3},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Appliance Type\",\"Response\":\"Portable Appliance\",\"UUID\":\"ca94ec70-74da-4432-a1e8-3c2c040ecb8d\",\"SortOrder\":1},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Earth Resistance\",\"Response\":\"N\\/A\",\"UUID\":\"45a46b64-b28b-4f0a-b86e-a73f2742892b\",\"SortOrder\":4},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Leakage Current\",\"Response\":\"Pass\",\"UUID\":\"2d492371-ba9f-4fb6-a1a6-9c978549479b\",\"SortOrder\":6},{\"FieldType\":\"Multiple Choice\",\"Question\":\"Appearance Changed\",\"Response\":\"No\",\"UUID\":\"9a4f3b3d-40b9-4038-b0c5-e5866a607f71\",\"SortOrder\":7}]",
  "timestamp": "2019-05-27 15:50:02",
  "form_by_staff_uuid": "8b3031c3-469f-48f4-9e46-daa8fe01ccfb",
  "document_attachment_uuid": "",
  "asset_uuid": "b6420210-0709-4a4c-956b-3d7d4575d00a",
  "uuid": "198fc098-0271-4f28-be4c-1a2fb5066dfa"
}

如何索引嵌套的field_data数组?

我正在跟踪“问题” =“重新测试”的“响应”对象

我不知道所有的反斜杠是什么,而且我似乎无法调用对象值

myJSONdata.field_data[0].Response

0 个答案:

没有答案