我想像这样获得相同的数组:
var data =
[
{"date":"20111001","Happy":"63.4","Sad":"62.7","Angry":"72.2"},
{"date":"20111002","Happy":"67.4","Sad":"61.7","Angry":"52.2"},
{"date":"20111003","Happy":"60.4","Sad":"84.7","Angry":"44.2"}
];
如果我有两个列表:列出项目
var items=["date","Happy","Sad","Angry"];
和一个值数组:
var values=[
["20111002","67.4","61.7","52.2"],
["20111003","60.4","84.7","44.2"],
];
如何组合到数组:项目和值以获得相同的第一个示例?