I am trying to pass a variable into query.outfields.
When it is hard coded it works. Coming in as an object.
query.outFields = ["OBJECTID", "NAME"];
Passing in the JSON variable does not work.
query.outFields = JSON.parse(FieldNames); // "['OBJECTID', 'Name']" (value in query parameter through FFox)
I am getting a JSON error in the browser that says it cannot recognize the square bracket [ .
Any suggestions on how to pass in JSON variables into query.output would be great.