A dumb question, I know. But I have a problem. From a server I make a js call and always get the response in div tags encapsulated .
But the response is in JSON form
so we have response variable data
data="<div> json_string_here</div>";
so how can i from it get only json_string_here, and with not an escaped strings????
If the data returned is a string, you can use the following to extract the JSON and put it into an object
EDIT: Here’s a jsfiddle example http://jsfiddle.net/qV2Nw/2/