DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
if json then parse
function isJson(str) { try { let value = JSON.parse(str); return value } catch (e) { return str; } }
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#json
#parse
ADD COMMENT
Topic
COMMENT
Name
3+7 =
Submit