Skip to content Skip to sidebar Skip to footer

Bind Json Object As A Value In Angularjs Html Select - Dropdown

I'm having a JSON collection $scope.person = [ { 'Id': 1 'Name': 'John' }, { 'Id': 2 'Name': 'Jack' }, { 'Id': 3

Solution 1:

You can just do the following to get the JSON Object:

JSON.parse(yourJsonString); 

So your code should look like:

var newDataJSON = JSON.parse(newData)
 var name = newDataJSON.Name

Post a Comment for "Bind Json Object As A Value In Angularjs Html Select - Dropdown"