I am facing an issue with using JSON.stringify to create a JSON string from an Object. After saving the string into a file, I attempt to read the file and use JSON.parse to retrieve the object again. However, it seems that the process is not working as expected. For instance, when trying to select elements using [i], it only retrieves the charset as if it were a string.
Can anyone provide assistance on how to resolve this?
The following is just a simplified example, as the actual JSON data is extensive:
{"featureCollection":
{"layers":"[
{\"layerDefinition\":
{\"currentVersion\": 10.3,
\"id\": 0,
\"supportsCoordinatesQuantization\": true,
\"advancedQueryCapabilities\":
{
\"supportsPagination\": true,
\"supportsDistinct\": true
},
\"geometryType\":
\"esriGeometryPolygon\", \"minScale\": 0,
\"maxScale\": 0,
\"extent\":
{},
\"drawingInfo\":
{\"renderer\":
{\"type\": \"simple\", \"symbol\":
{\"type\": \"esriSFS\", \"style\": \"esriSFSSolid\", \"color\": [76, 129, 205, 191], \"outline\":
{\"type\": \"esriSLS\", \"style\": \"esriSLSSolid\", \"color\": [0, 0, 0, 255], \"width\": 0.75}
}
},