json – Best format to store 3D level map data

I’ve started working on my simple first person dungeon crawler game (something similar to Delver or Backspace Bouken) – as I’m front-end developer, my tools of choice are JavaScript and Babylon.js library.

Initially, I’ve planned to use the following format:

{
  "grid": (
    (0, 1, 1, 0, 0, 0, 1),
    (0, 1, 1, 0, 0, 0, 1),
    (0, 1, 1, 0, 0, 0, 1),
    (0, 1, 1, 0, 2, 0, 1),
    (0, 1, 1, 1, 1, 1, 1),
    (0, 1, 1, 0, 0, 0, 1),
    (0, 1, 1, 0, 0, 0, 1),
  ),
  "tiles": {
    1: {
      "ceiling": "/image1.jpg",
      "walls": "/image2.jpg",
      "floor": "/image3.jpg"
    },
    2: {
      "ceiling": "/image1.jpg",
      "walls": "/image1111.jpg",
      "floor": "/image3.jpg"
    }
  }
}

Each non-zero tile in the grid means that player can move into that field, let’s say e.g. it will be a square 64×64 pixels. If the tile collides with each non-zero field, then it doesn’t display any walls between them, only between non-zero and 0 ones.

This was pretty fine for my needs initially, but now I’m thinking about introducing elevations, walls with non-cubic shapes (e.g. triangular prisms), ladders and stairs.

I was thinking about extending the grid property to another array dimension, that will represent the elevation level (so every 2D array inside will represent each floor level separately) but I’m not sure if there are any more efficient solutions for such problems?

(not 100% sure, if this topic is suitable for this stack, or e.g. code review one?)