google apps script - Missing ] after element list error in JSON -


when try save changes google apps script file following error:

missing ] after element list.

this code:

  var request = {     "name": "name",     "id": 3,     "rules":[       {         "name": "nested",         "tags": [           {             "tagid": 1,             "variables":[               [                 "variable": "var1"               ]             ],             "condition": false,           },           {             "tagid": 1,             "condition": false,           }         ],         "rulesetid": 3,       }     ]   } 

the error indicates problem on line contains "variable": allscopes[i].variable, can't find problem is...

this example json object need build:

enter image description here

note trying use array literal construct object:

"variables":[   [     "variable": "var1"   ] ], 

as looks need object, not array here, replace inner [] {}:

"variables":[   {     "id": null,     ...,     "value": ".*"   } ], 

Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -