Javascript 如何上传&;查看json文件以便稍后在Ionic 3中获取其数据?

Javascript 如何上传&;查看json文件以便稍后在Ionic 3中获取其数据?,javascript,json,ionic-framework,ionic3,Javascript,Json,Ionic Framework,Ionic3,我有一个小的json,我想在上传到我的网站后使用数据 { "Images" : { "url": [ "https://images4.alphacoders.com/474/thumb-1920-47438.png", "https://images7.alphacoders.com/303/thumb-1920-303042.png" ] } } 我的问题是:当我上传file.json时,我只能下载它 编辑: 为了让

我有一个小的json,我想在上传到我的网站后使用数据

{
"Images" : {
    "url":
       [
        "https://images4.alphacoders.com/474/thumb-1920-47438.png",
        "https://images7.alphacoders.com/303/thumb-1920-303042.png"
       ]
   }
}
我的问题是:当我上传file.json时,我只能下载它

编辑:

为了让我的问题更清楚,我在临时站点上传了json文件

在这里,当我尝试从我的站点和其他站点(如[Myjson.com])使用json时,情况有所不同

只有使用此方法(在ionic 3中)使用第二个链接,我才能从json获取数据


那么,可以从第一个链接获取json吗

我很久以前就搜索过类似的东西,所以不记得我搜索了什么,但下面是帮助我尝试这段代码的示例

$.ajax({
      url: yourUrl,
      type: "GET",
      dataType: "json",
      data: null,
      success: function (response) {
           console.log("RESULT:" + JSON.stringify(response));
           var json = JSON.parse(response);
      },
      error: function (response) {
           console.log("ERROR:" + JSON.stringify(response));
      }
 });

任何人都能帮上忙@Suraj RaoI编辑了这个问题,你现在可以@Alon Eitan检查它
$.ajax({
      url: yourUrl,
      type: "GET",
      dataType: "json",
      data: null,
      success: function (response) {
           console.log("RESULT:" + JSON.stringify(response));
           var json = JSON.parse(response);
      },
      error: function (response) {
           console.log("ERROR:" + JSON.stringify(response));
      }
 });