我有一个非常复杂的字符串,如下所示,
"data":"[
{
"id": "123456",
"from":
{
"name": "ABC",
"id": "123"
},
"message": "isafh",
"story": "Best Story",
"properties":
[
{
"name": "By",
"text": "PROUD TO BE AN INDIAN",
"href": "www.xyz.com"
}
],
"privacy":
{
"value": ""
},
"type": "photo",
"created_time": "2013-10-24T07:17:28+0000",
"updated_time": "2013-10-24T07:17:28+0000"
},
{
"id": "122423456",
"from":
{
"name": "ABCaasd",
"id": "124233"
},
"message": "isafh",
"story": "Best nice Story",
"properties":
[
{
"name": "By",
"text": "PROUD TO BE AN INDIAN",
"href": "www.abc.com"
}
],
"privacy":
{
"value": ""
},
"type": "photo",
"created_time": "2013-10-24T07:17:28+0000",
},
{
Similar data as above {... }
},
]"
"next token":"1233"
这里所有的 JSON 数据都在这些括号“[]”中,它们由“{ ... }”大括号分隔。这里我想要所有花括号中的消息、故事和属性。尝试了两件事,一是两次将所有内容再次放入 JSON 对象中,还尝试了一次无用的尝试来匹配正则表达式“消息:”,但即使这样也没有用。
从所有大括号中找到消息、故事和属性的方法是什么。