Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

convert string to object javascript

str = "firstName:name1, lastName:last1"; // NB: No enclosing ""
obj = eval('({' + str + '})');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #convert #string #object #javascript
ADD COMMENT
Topic
Name
9+3 =