Hi,
My scenario is to get json file from the path and overwrite id and save it in the existing path.
But after updating the id the file is not saved in the same path.
Here is my snippet
${post_json_data}= Get File ../json.txt
${parsed_json}= Evaluate json.dumps(${post_json_data}) json
${json_response}= convert string to json ${parsed_json}
${id}= Set Variable ${json_response['id'][0]['chars']['id']}
Log ${json_response}
Log ${id}
Set To Dictionary $json_responseid[0].chars["ID"]] 2222
${new_ID}= Set Variable $json_response['id'][0] 2222
Log ${${new_ID}}
${updated_json}= Evaluate json.dumps(${json_response}, indent=4) json
Set Global Variable ${updated_json}
#Create File ../json.txt ${parsed_json}
Write To File1 ../json.txt data=${parsed_json}
Hi,
My scenario is to get json file from the path and overwrite id and save it in the existing path.
But after updating the id the file is not saved in the same path. And the id is not updated.