ajax data syntax error

0 favourites
  • 5 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • I want to post a JSON to this URL but I can not because of a Syntaxis error.

  • Put your data string into a variable (without the opening and ending quotation marks). And then use this variable in AJAX request.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • thanks

  • Put your data string into a variable (without the opening and ending quotation marks). And then use this variable in AJAX request.

    Hello, bro then I have this json loaded in the jon plugin and I am tried to take the value of result.data.medals.0 but I receive 0 because reason?

    {"success":true,

    "app_id":"test",

    "result":{"component":"Medal.getList",

    "data":{"success":true,

    "medals":[ {"id":67365, "name":"Check out the Credits Screen", "description":"Check out the Credits Screen", "icon":"\/\/apifiles.ngfiles.com\/medals\/53000\/53932\/67365_checkoutthecreditsscreen.webp", "value":0,"difficulty":1, "secret":0, "unlocked":false}, {"id":67366,"name":"Click on the secret icon", "description":"Click on the secret icon", "icon":"\/\/apifiles.ngfiles.com\/medals\/53000\/53932\/67366_clickonthesecreticon.webp", "value":0, "difficulty":1, "secret":0, "unlocked":false}]}}}

  • Forget it I already saw my mistake I did not see that "Medals" is an array, therefore it would be result.data.medals.0.id

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