diff --git a/MongoView/ExtendedJSON.swift b/MongoView/ExtendedJSON.swift index 4fbb034..7679858 100644 --- a/MongoView/ExtendedJSON.swift +++ b/MongoView/ExtendedJSON.swift @@ -45,7 +45,8 @@ struct ExtendedJSON { } static func prettify(_ string: String) -> String? { - let command = "JSON.stringify(JSON.parse(`\(string)`), null, 4)" + context.setObject(string, forKeyedSubscript: "value" as NSString) + let command = "JSON.stringify(JSON.parse(value), null, 4)" return context.evaluateScript(command)?.toString() }