skip to Main Content

Converting String into Dictionary via Python containing invalid JSON

As above mentions, I'm currently trying to convert a string into a dictionary that looks like below: "{"SOAPAction":"http://www.my-website..uk/path/To/service/v1/serviceAndLedger","ID":"1sceas2-61ae-379dd-a9cd-c813fb07u8inb", "info": {"GMT":"16/Nov/2022:12:13:46 +0000", "client":"10.177.147.71:42987", "frontend":"path/to_my_ip/12.189.66.213:8804", "request":"POST /path/service HTTP/1.1", "body":"\/path\/of\/downloaded\/file.xml", "response":"-"}}" The issue is that the above code currently doesn't convert into a…

VIEW QUESTION

Append value to dictionary of dictionaries in Javascript

I have the following JS code: var expected_dict = {} for (var i = 1; i < expected_data.length; i++) { if (expected_data[expected_data[i][0]] == undefined) { expected_dict[expected_data[i][0]] = {} } expected_dict[expected_data[i][0]][expected_data[i][20]] = {} expected_dict[expected_data[i][0]][expected_data[i][20]] = expected_data[i][21] console.log(expected_dict) } expected_data is an…

VIEW QUESTION
Back To Top
Search