I have json output and I would like to convert it into below format. I'm using ast.literaleval, I would like to have desired sorted by id and name in single quotes. I used ordered dict for desired order but not sure how to convert double quotes to single quotes for desired output. Any help appreciated. I'm using Python.
json_result=[{"name":"sample name","id":77}]
desired_output=[{'id':77,'name':'sample name'}]