Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何从下面的数组中访问字段名称“DateAndTime”,我需要正确格式化 json Date 输出。任何建议/帮助将不胜感激。
var chartData = [{"Value1":17.800,"DateAndTime":"\/Date(1338501601000)\/"}]
像这样:
alert( chartData[0].DateAndTime );
但请注意,您发布的代码中缺少结尾]。
]
请参阅工作演示。
你会这样做:
chartData[0].DateAndTime;