vendredi 8 mai 2015

Fetch a data from a string

I have this as a string. I have get this using jquery and parsing it from a web page.

I tried using jQuery.parseJSON and got the error Uncaught SyntaxError: Unexpected token n.

I need to get "surl" and "imgurl" how can I get this?

{
    ns:"images",
    k:"5061",
    mid:"172E23D582B8C2A90F3FE9DC2B04A3ECD1D4F70F",
    surl:"http://ift.tt/1JTDu4d",
    imgurl:"http://ift.tt/1ceVfwD",
    ow:"480",
    docid:"608038082569896450",
    oh:"301",
    tft:"117",
    dls:"images,5487"
}

Aucun commentaire:

Enregistrer un commentaire