I have a string that appears like an object but actually is a string. It does not look very nice and comfortable to read. Are there any possibilities to change this? JSON.parse
does not seem to work because not every element meets the requirements to be a JSON object. For example, number 0 does not have any quotes. Any ideas?
{'credits': [{'api_user_id': '1', 'amount': '897.26', 'l_amount': '0.00', 'period': '90', 'charge': '338.77', 'o_charge': '338.77', 'created': '2019-11-20 12:46:56', 'registered': '2019-11-20 12:46:56', 'expire': '2020-02-20', 'max_delay': '0', 'delay': 0, 'debt': '0.00', 'late_fee': '0.00', 's_payment': '0.00', 'discount_code': '', 'description': 'reg', 'p_amount': '0.00', 'paid': '0000-00-00 00:00:00', 'origin_id': 0, 'confirmed': '0', 'l_interest': '0.00', 'l_administrative_fee': '0.00', 'l_cinterest': '0.00', 'l_late_fee': '0.00', 'l_penalty': '0.00', 'l_s_amount': '0.00', 'l_s_interest': '0.00', 'l_s_administrative_fee': '0.00', 'important': 0, 'schedule': [{'date': '2019-12-20', 'day': 30, o: '897.26', 'c': '0.00', 'p': '160.61', 's': '251.40', 'amount': '412.01'}, ]}