如下json串,根据name的值,提取project_id,比如有name值是test3, 想拿到对应的project_id 37:
[{
"creation_time": "2021-04-02T10:03:31.657Z",
"current_user_role_ids": null,
"cve_allowlist": {
"creation_time": "2021-04-02T10:03:31.660Z",
"id": 34,
"items": [],
"project_id": 34,
"update_time": "2021-04-02T10:03:31.660Z"
},
"metadata": {
"public": "false"
},
"name": "test1",
"owner_id": 34,
"owner_name": "test1",
"project_id": 34,
"repo_count": 1,
"update_time": "2021-04-02T10:03:31.657Z"
}, {
"creation_time": "2021-04-06T01:48:12.097Z",
"current_user_role_ids": null,
"cve_allowlist": {
"creation_time": "2021-04-06T01:48:12.098Z",
"id": 37,
"items": [],
"project_id": 37,
"update_time": "2021-04-06T01:48:12.098Z"
},
"metadata": {
"public": "false"
},
"name": "test3",
"owner_id": 37,
"owner_name": "test3",
"project_id": 37,
"update_time": "2021-04-06T01:48:12.097Z"
}]