skip to Main Content

Json – How to convert javascript (string) to dictionary

import re import json json_pattern = re.search(r'residentSubmitDetails:s*({.*?})s*}', js_code, re.DOTALL) print(json_pattern) if json_pattern: json_str = json_pattern.group(1) json_obj = json.loads(json_str) print(json_obj) I have a javascript code and I need to convert particular block of line into dictionary/json format. The data I need…

VIEW QUESTION
Back To Top
Search