#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    29
    Rep Power
    0

    Data from server JSON


    Hi to all. Do you know, when i have call function to server, and data that he is returning is in JSON format but how to save it in JS to use that JSON later.
    {} or [] OR VAR ???

    I'm sure that the data is JSON. Mi question is how to save it to call and collect specific elements later.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    13
    Rep Power
    0
    Use:
    Code:
    var jsonObj = JSON.parse(jsonString);
    where 'jsonString' is the data you received from the server.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    29
    Rep Power
    0
    Originally Posted by mbrown3391
    Use:
    Code:
    var jsonObj = JSON.parse(jsonString);
    where 'jsonString' is the data you received from the server.

    Great i will try it and let you know.

IMN logo majestic logo threadwatch logo seochat tools logo