0

Getting [Object, Object] as the result from controller.How can I get each value of ID and title in $.each(data, function (index, el) {}

[Object, Object]

0:Object
ID: 9
title: "15Sep2015"

1: Object
ID: 15
title: "rrr"

1 Answer 1

2

You can do

$.each(data, function (index, el) {
   var id = el.ID , // or el['ID']
       title = el.title ; // or el['title'] 
});

Ref : Property Accessors

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.