2

How can I access the field name "DateAndTime" from the below array, I need to format the json Date output correctly. Any advice/assistance would be appreciated.

var chartData = [{"Value1":17.800,"DateAndTime":"\/Date(1338501601000)\/"}]
1
  • Looks like Nelson wrote it first. Commented Nov 23, 2012 at 18:25

2 Answers 2

2

Like this:

alert( chartData[0].DateAndTime );

But take care you are lacking an ending ] in your posted code.

See working demo.

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

Comments

1

You would do this:

chartData[0].DateAndTime;

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.