AnsweredAssumed Answered

Create JSON Array

Question asked by fmdataweb on Feb 6, 2018
Latest reply on Feb 7, 2018 by bigtom


I'm using FileMaker Pro v16 and would like to use the new JSON functions to create an array like this:

 

{

  "query": [

    {

      "Date": "11/01/2017...12/31/2017"

    }

  ]

}

 

but I can't quite get the correct syntax to build the array. If I use:

 

JSONSetElement ( "" ;

["Date" ; $dateRange ; JSONString ]

)

 

I get this:

 

{

"Date" : "11/01/2017...12/31/2017"

}

 

but can't work out how to add the "query" array as well. Appreciate any pointers to what I'm missing here.

 

Thanks!

Outcomes