How do I create a Json from Excel and put it into a Dictionary/Array?

0 favourites
  • 6 posts
From the Asset Store
Awardkit
$5 USD
Create custom awards and achievement or use the many templates and create your own.
  • Hello,

    I know this may seem like a simple question, but is it possible for someone to walk me through creating a JSON file using Excel and then getting it imported into Construct 3 into specifically a Dictionary OR Array format?

    I want to save time and not have to go through mistakes and errors. So I'd be very grateful for this.

    Many thanks.

  • Save your table in CSV format, then use one of the online tools to convert it to JSON. Here is the first result from google.

    Then you'll need to manually modify JSON for Construct format. Here are a few examples:

    {"c2dictionary":true,"data":{"a":409,"b":473,"h":643,"f":313,"l":394}}

    {"c2array":true,"size":[4,1,1],"data":[[[73]],[[55]],[[76]],[[40]]]}

    .

    Note, that if you are going to load JSON directly from a string, you'll have to double all quotation marks:

    MyArray load from JSON string "{""c2array"":true,""size"":[4,1,1],""data"":[[[73]],[[55]],[[76]],[[40]]]}"
    
  • Cheers for this Dop, i'll take a look at it this week :)

    Btw - do you know if it's possible to access the 'description (optional)' element of a Global Variable using the events?

    For example, could I use the description inside a global variable inside a text object instead of adding the description manually to the text object separately?

    e.g.

    On button press

    >text object - show text - global_variable1 description

    Thanks for any help.

  • No, I'm pretty sure that description is just a comment and you can't access it with events.

  • Try Construct 3

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

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

  • Cheers for this Dop, i'll take a look at it this week :)

    Btw - do you know if it's possible to access the 'description (optional)' element of a Global Variable using the events?

    For example, could I use the description inside a global variable inside a text object instead of adding the description manually to the text object separately?

    e.g.

    On button press

    >text object - show text - global_variable1 description

    Thanks for any help.

    Does this mean it's not really feasible with vast amounts of data?

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