Nested arrays in schema

Hi there,

I have a field which is a two dimensional array that I am trying to build into a schema. The field is a set of x,y coordinates, e.g. [[1.0,1.0],[2.0,2.0],[3.0,3.0]].

The schema I am trying to apply is

  "title": "locations",
  "bsonType": "object",
  "required": [
  "properties": {
    "_id": {
      "bsonType": "objectId"
    "boundary": {
      "title": "points",
      "bsonType": "array",
      "uniqueItems": false,
      "items": {
        "title": "xy",
        "bsonType": "array",
        "uniqueItems": false,
        "items": {
          "bsonType": "double"

This validates fine, but the error I am getting from the client is ‘Client query is invalid/malformed (IDENT, QUERY)’.

Is what I am trying to do possible? Any guidance anyone can give would be really appreciated!


Hi, Realm DB does not support storing lists of lists unfortunately at the moment. Using that JSON Schema will actually make the collection by “sync invalid”. We are currently in the process of trying to remove this limitation and have better support for geospatial data, so stay tuned for announcements on that.


Thanks Tyler,

That makes sense, appreciate the response.

Look forward to future updates!