我想把date
存储在一个单独的数组中.....怎么做???我有点糊涂了....请帮帮我....
(
{
"2015-03-27" = {
amount = 13086;
date = "2015-03-26 18:30:00 +0000";
"date-day" = 27;
"date-month" = Mar;
"date-year" = 2015;
units = 2160;
};
},
{
"2015-08-03" = {
amount = 18300;
date = "2015-08-02 18:30:00 +0000";
"date-day" = 03;
"date-month" = Aug;
"date-year" = 2015;
units = 2950;
};
},
)
2条答案
按热度按时间yacmzcpb1#
您的数据在数组中(字典的集合)
因此,首先从数组中获取字典,然后将特定字典的键添加到新数组中(这是日期的结果数组)
试试这个:
afdcj2ne2#
外部对象是一个数组,项0包含两个字典。
然后枚举字典并提取
date
值