我想grep唯一的值:“INC1301724”来自“display_value”:“INC1301724”,来自文本文件:Response.txt如下:
print('Response after Snow ticket update : '+response.text)
response.text的值为:
{"import_set":"ISET1677878","staging_table":"u_incident_create_import","result":[{"transform_map":"Incident Create Import","table":"incident","display_name":"number","display_value":"INC1301724","record_link":"https://example.com/api/now/table/incident/04331234rfgthyjjkkkkllljhfdd","status":"inserted","sys_id":"01234567890"}]}
2条答案
按热度按时间nkoocmlb1#
你只需要在每一行中搜索“display_value”,然后用search about index of '"'剪切子字符串:this is image of the Solution
3okqufwl2#
使用
json
: