[solved] How do I search within Json / Array?

0 favourites
  • 6 posts
From the Asset Store
Supports 1D, 2D, 3D arrays. Import and export arrays in JSON format
  • I have a problem to search within a .json file.

    I load a json file into in an Array and insert one data in a global variable. That was the easy part.

    When I search for the Position in the Array, the result with the global variable is wrong, without the variable it is correct.

    Where is the error? I add a samle to see my problem.

  • Perhaps it can be easier to manipulate json with this plugin

  • Thx, I'll check it.

    But I'm not manipulating the json file. I'm just searching for in the file for e.g. a number. Maybe it's easier to rethink and use you plugin

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Tell me if you need some help

  • ok, I have headache with comparing jsons data (or Construct2 has headache with me) and I need a little bit help.

    (PS; the plugin works fine)

    I have two json.

    1.) has information about a building (e.g. production time, price, Image, description, ... and an ID)

    2.) has information about the user (only the ID)

    The idea is: a small user json get all data from several json with all information and then show the right text from the "detailed" json.

    All my tries didn't worked. Has anybody tried this before or has any idea?


  • ok, I solved it. Nothing what a glass whisky can solve

    Actually it is easy, but it needs a little bit "organization" on database structure.

    Two databases need the same column (e.g. "ID")

    1. Database with all the details (let's say: "Detail")

    2. Database with the user-information (let's say: "Overview")

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