2
Dojoモバイルアプリをビルドしています。私は、内部のデータを取得することができる午前 DojoでJsonデータを表示
dojo.xhrPost({
url: "diet.json",
handleAs: "json",
load: function(response) {
console.log(response.Introduction[0].title);
}
});
タイトル
で書かれたように、コードを印刷し導入後{
Introduction:
[
{
title: "Introduction",
toolbar: "Page 1",
content: "cont, aabitant morbi tristique..."
},
{
title: "Introduction",
toolbar: "Page 2",
content: "contesent vel nisi ipsum..."
}
],
Services:
[
{
title: "services",
toolbar: "Page 1",
content: "Cras adipiscing sapien nec..."
}
]
}
:私のようなJSONファイルを持っています。どのように私は、最初の見出しを取得することができ、すなわち
- はじめ
- サービス
私はサービスについて知らなかったとします。どうすればサービスを受けることができますか? –
@imi - 私の編集を参照してください –