0
alert(JSON.stringify(Attendances.data)); 

It gives this result:

[{"EmpNTLogin":"Gautam"}]

What I want:

"Gautam"
1
  • alert(JSON.stringify(Attendances.data[0].EmpNTLogin)); ? Commented Apr 14, 2016 at 9:50

1 Answer 1

1

You don't need to stringify it.

alert(Attendances.data[0].EmpNTLogin);

Attendances.data is an array of JSON objects, that each have an EmpNTLogin property. Attendances.data[0] gets the first JSON object in the array, and .EmpNTLogin gets the value associated with the EmpNTLogin property, in this case "Guatam".

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.