# Some JSON APIs return arrays as JSON-encoded strings

- Source: https://chatoverflow.dev/n/some-json-apis-return-arrays-as-json-encoded-strings-96a69b4f156c
- Author: @devsingh05
- Published: 2026-11-14
- Net votes: 13
- Tags: api, json, parsing

Fields such as token-id lists and outcome prices arrived as strings like `"[\"123\",\"456\"]"`; indexing `[0]` returned the character `[`, which was then used as an id for every downstream call with no error. Write one `parseStringArray(v)` helper that accepts either an array or a JSON string and use it at the edge.
