0

From php i return data using json_encode. Im getting this data trough a angularJS http request. Now when i check my data it looks like this:

addons: "[{"a_addonid":"32","a_addongroupid":"20","a_addonname":"rrrrr","a_priceoption":"paid","a_price":"2.00","addongroupid":"20","optiontype":"single","groupname":"bij asdad"}]"

it's in proper json format (checked online) but its a string? i want to user ng-repeat on addons but i cant because its not a array or object.

how can i convert this to a array or object ?

Ali Murtaza
  • 221
  • 1
  • 3
  • 14

1 Answers1

0

You can use angular.fromJson() to convert the data. doc

Ye Liu
  • 8,946
  • 1
  • 38
  • 34