0

Following is the response being sent

userIdToResponsesMap:
1.  10ce550c-4ee2-44a5-99d3-92552c9e8cfa:
    0:"["65431.35","12606.12","11637.09","4848.06"]"
    1:"["dealer-2","dealer-3","dealer-3","d-1001"]"

Above values look like an array, but in JS, usually arrays do not have the beginning and ending " (quotes). So, is there something else that I am missing here

bastelflp
  • 9,362
  • 7
  • 32
  • 67

1 Answers1

0

This is a json string. To retrieve the array you can do var array = JSON.parse().

In your example, following should work var array = __responses.userIdToResponsesMap["10cde550c-4ee2-44a5-99d3-92552c9e8cfa"][0]