原生php如何通过一大段杂乱的数据循环取出需要的字段数据,大概就是以下这种数据,如何只取出_source字段里面的值
例:
```json
[
{
"took": 21,
"_shards": {
"total": 1,
"successful": 1,
},
"hits": {
"total": {
"value": 9867,
},
"max_score": 19.08063,
"hits": [
{
"_index": "11223",
"_source": {
"question": "12312312312",
"answer": "123 ",
"uptime": "2021-12-18"
}
},
{
"_index": "11223",
"_source": {
"question": "456",
"answer": "456",
"uptime": "2021-06-02",
"type": null,
}
}
]
}
},
{
"took": 8,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 3868,
"relation": "eq"
},
"max_score": 15.672188,
"hits": [
{
"_index": "new",
"_source": {
"question": "123123。",
"paperid": "3359303",
"uptime": 1662429961
}
},
{
"_index": "new",
"_source": {
"question": "安徽省 皖",
"options": "[]",
"old_qid": "150545873",
"paperid": "3291952",
"uptime": 1662182354
}
},
{
"_index": "new",
"_source": {
"question": "85236511",
"paperid": "4785631",
"uptime": 1661438051
}
]
}
}
]
```