関数の外で配列のすべての内容を取得するにはどうすればよいですか?
$.each(Basepath.Templates, function(i){
templateArray = new Array({title: Basepath.Templates[i].Template.name, src: 'view/'+Basepath.Templates[i].Template.id, description: Basepath.Templates[i].Template.name});
});
console.log(templateArray); //contains only one array;
編集:
これは私が欲しい出力です
templateArray[
{
title: "one",
src: "view/1",
description: "Descrption 1"
},
{
title: "two",
src: "view/2",
description: "Descrption 2"
},
{
title: "one",
src: "view/3",
description: "Descrption 3"
}
]