TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankit Shukla
NA
681
116.9k
Get data from json array
Aug 8 2017 9:05 AM
Hello,
I have angularJS code like this:
$scope.GetCities = function () {
//alert("yuyu");
var RouteNo = $scope.StoppageMaster.RouteNo;
if (RouteNo) {
$http({
method: 'POST',
url: '/Stoppage/GetCities/',
data: JSON.stringify({ RouteNo: RouteNo })
}).success(function (data, status, headers, config) {
$scope.Source1 = JSON.stringify(data);
alert($scope.Source1);
}).error(function (data, status, headers, config) {
$scope.message = 'Unexpected Error';
});
}
else {
$scope.states = null;
}
}
Output:
[{"Source":"Kanpur","Destination":"Lucknow"}]
I need value of
source
. Please help.
Reply
Answers (
7
)
Problem in insert dropdown value in asp.mvc using angularjs
Difference Between Angular 2 And Angular 4