Load remote XML/JSON and parse it

0 favourites
  • 2 posts
From the Asset Store
Progress\Loading Bar
$2.40 USD
40% off
Progress\Loading Bar. Now Load you game like a Professional.
  • Hi everybody!

    I need to load a JSON or XML file from a remote source with AJAX, the problem is not to load it, but to parse it!

    If I run the layout I can see in the firebug console, that the request is completed succesfully and it returns the JSON file.

    Now I want to generate a list of online users with this JSON, how can I do that?

    The request returns this:

    [ 
    { 
    "username": "marc****co",
    "seconds": "5",
    "photo": "https://graph.facebook.com/134****302/picture?width=90&height=90",
    "level": "2"
    },
    { 
    "username": "jo****sa",
    "seconds": "10",
    "photo": "https://graph.facebook.com/143****567/picture?width=90&height=90",
    "level": "5"
    }
    ] [/code:3cv9aa68]
    Thank you!
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I solve the problem by switching to XML and now it works well!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)