Zum Hauptinhalt gehen

Unescape JSON?

Kommentare

2 Kommentare

  • Bryan Bingham

    Hi Richard,

     

    have you attempted to use the replace() javascript string method?

     

    You should be able to do something like =$myJsonString.result.replace("\"","")

    0
  • Richard Webb

    Hi Brian,

     

    Running the above on below has no effect. That said sending to the alert window the same json is unescaped.

     

    {

     "result": "{\"geometry\":{\"x\":16325547.577395009,\"y\":-5157188.670276476,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857}},\"symbol\":{\"color\":[0,0,0,255],\"type\":\"esriTS\",\"haloSize\":0.75,\"haloColor\":[255,255,255,255],\"horizontalAlignment\":\"left\",\"angle\":0,\"xoffset\":0,\"yoffset\":0,\"text\":\"Sector A\",\"rotated\":false,\"kerning\":true,\"font\":{\"size\":13.999999999999998,\"style\":\"normal\",\"weight\":\"bold\",\"family\":\"Calibri\"}}},{\"geometry\":{\"x\":16327754.69658674,\"y\":-5161029.630947801,\"spatialReference\":{\"wkid\":102100,\"latestWkid\":3857}},\"symbol\":{\"color\":[0,0,0,255],\"type\":\"esriTS\",\"haloSize\":0.75,\"haloColor\":[255,255,255,255],\"horizontalAlignment\":\"left\",\"angle\":0,\"xoffset\":0,\"yoffset\":0,\"text\":\"Sector B\",\"rotated\":false,\"kerning\":true,\"font\":{\"size\":13.999999999999998,\"style\":\"normal\",\"weight\":\"bold\",\"family\":\"Calibri\"}}}"

    }

     

    EscapedAlert

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.