VMware Cloud Community
CalmCloud
Enthusiast
Enthusiast
Jump to solution

string to JSON

Hi All,

Is it possible to convert  string( with JSON data) into a javascript object. JSON.parse() does not work. JSON object is not available.

Any help appreciated.

Reply
0 Kudos
1 Solution

Accepted Solutions
Burke-
VMware Employee
VMware Employee
Jump to solution

That's a bit strange, as long as I have had validated json strings, I have not had an issue with JSON.parse() - see article here: Creating json objects in Orchestrator

Have you validated your string with jsonlint.com ?

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter

View solution in original post

Reply
0 Kudos
3 Replies
CalmCloud
Enthusiast
Enthusiast
Jump to solution

eval("(" + str+ ')'); works. Not sure why JSON object is not available

qc4vmware
Virtuoso
Virtuoso
Jump to solution

JSON.parse() should be working.  Can you supply the string you are attempting to parse?

Reply
0 Kudos
Burke-
VMware Employee
VMware Employee
Jump to solution

That's a bit strange, as long as I have had validated json strings, I have not had an issue with JSON.parse() - see article here: Creating json objects in Orchestrator

Have you validated your string with jsonlint.com ?

If my answer resolved or helped you, please mark it as Correct or Helpful to award points. Thank you!

Visit http://www.vcoteam.info & http://blogs.vmware.com/orchestrator
for vRealize Orchestrator tips and tutorials - @TechnicalValues on Twitter
Reply
0 Kudos