JSON CONVERTED ARRAY IS A STRING?

Hugh Jackman

Total Post:52

Points:366
Posted by  Hugh Jackman
JSON 
 1501  View(s)
Ratings:
Rate this:
Hi Expert, 

I've converted an array inside c# to json (This ugly escaping bahh). Loaded it into javascript. Should be an array. Right now it's a string. How to solve this. What is wrong here ?

["\u003cdiv\u003e\u003ch1\u003eText\u003c/h1\u003e\u003cp\u003eText. Text\u003cbr/\u003eText changes and Text\u003cbr/\u003eText\u003cbr/\u003ebase.\u003c/p\u003e\u003cbr/\u003e\u003ch1\u003eRequirements\u003c/h1\u003e\u003cp\u003e.Text Text\u003c/p\u003e\u003cbr/\u003e\u003ch1\u003eLicensing\u003c/h1\u003e\u003cp\u003eFree / 

Text\u003c/p\u003e\u003cbr/\u003e\u003ch1\u003eDownload\u003c/h1\u003e\u003ca href=\u0027Text\u0027\u003eZIP-Archiv,Text\u003c/a\u003e\u003c/div\u003e","\u003cdiv\u003e\u003cvideoposter=\u0027./Image/poster.png\u0027controls\u003e\u003csource src=\u0027./Content/Video/video.mp4\u0027 type=\u0027video/mp4\u0027\u003e\u003c/video\u003e\u003c/div\u003e"]

[{"Content":"[\"\\u003cdiv\\u003e\\u003ch1\\u003eText\...

Thanks in advance for any recommendations or solutions.

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Json Converted array is a string?

    You can use JSON.parse to deserilize it.

    var array = JSON.parse(myJsonString);

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!