2013-06-23 70 views
0

數據這是我的JSON數據導出如何獲取JSON嵌套從API網址

{ 
"count":79, 
"stories":{ 
    "23658975":{ 
    "title":"NOMINATIVO", 
    "description":"BUSDRAGHI PIERGIORGIO", 
    "updated_at":"2013-06-16T18:55:56+02:00", 
    "created_at":"2013-06-16T18:39:06+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":14, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658975", 
    "workspace_id":"3190675", 
    "parent_id":"23658965" 
    }, 
    "23658985":{ 
    "title":"SOGGETTO", 
    "description":"PRIVATO", 
    "updated_at":"2013-06-16T18:55:56+02:00", 
    "created_at":"2013-06-16T18:39:06+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":15, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658985", 
    "workspace_id":"3190675", 
    "parent_id":"23658965" 
    }, 
    "23658995":{ 
    "title":"CF/P.IVA", 
    "description":"BSD PRG 77P19 G999C", 
    "updated_at":"2013-06-16T18:55:56+02:00", 
    "created_at":"2013-06-16T18:39:06+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":16, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658995", 
    "workspace_id":"3190675", 
    "parent_id":"23658965" 
    }, 
    "23659005":{ 
    "title":"DOMICILIO o SEDE LEGALE", 
    "description":"Via NOMEVIA, xx - LOCALITA CAP COMUNE (PR)", 
    "updated_at":"2013-06-16T18:55:56+02:00", 
    "created_at":"2013-06-16T18:39:06+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":17, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23659005", 
    "workspace_id":"3190675", 
    "parent_id":"23658965" 
    }, 
    "23659015":{ 
    "title":"LEGALE RAPPRESENTANTE", 
    "description":"-", 
    "updated_at":"2013-06-21T00:46:56+02:00", 
    "created_at":"2013-06-16T18:39:06+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":18, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23659015", 
    "workspace_id":"3190675", 
    "parent_id":"23658965", 
    "sub_story_ids":[ 

    ] 
    }, 
    "23658885":{ 
    "title":"INCARICO N.", 
    "description":"22999", 
    "updated_at":"2013-06-16T18:47:50+02:00", 
    "created_at":"2013-06-16T18:39:05+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":5, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658885", 
    "workspace_id":"3190675", 
    "parent_id":"23658875" 
    }, 
    "23658895":{ 
    "title":"DATA INCARICO", 
    "description":"12 Giugno 2013", 
    "updated_at":"2013-06-16T18:47:50+02:00", 
    "created_at":"2013-06-16T18:39:05+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":6, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658895", 
    "workspace_id":"3190675", 
    "parent_id":"23658875" 
    }, 
    "23658905":{ 
    "title":"NUMERO SINISTRO", 
    "description":"721234567-1", 
    "updated_at":"2013-06-16T18:47:50+02:00", 
    "created_at":"2013-06-16T18:39:05+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":7, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658905", 
    "workspace_id":"3190675", 
    "parent_id":"23658875" 
    }, 
    "23658915":{ 
    "title":"DATA SINISTRO", 
    "description":"1/5/13", 
    "updated_at":"2013-06-16T18:47:50+02:00", 
    "created_at":"2013-06-16T18:39:05+02:00", 
    "due_date":null, 
    "start_date":null, 
    "story_type":"task", 
    "state":"not started", 
    "position":8, 
    "archived":false, 
    "deleted_at":null, 
    "sub_story_count":0, 
    "budget_estimate_in_cents":null, 
    "time_estimate_in_minutes":null, 
    "budget_used_in_cents":0, 
    "logged_billable_time_in_minutes":0, 
    "id":"23658915", 
    "workspace_id":"3190675", 
    "parent_id":"23658875" 
    }, ... and so on ... (check the api url blow for full file) 

導出文件通過一個API URL自動生成的,所以我不能修改JSON結構。下面是完整的JSON文件http://www.studiokaleya.it/mavenlinkapi/dati/stories.json

這是我想要做什麼:

  1. 一個Web頁面的API網址workspace_id值和按鈕可填寫字段來自動生成的API
  2. 搜索
  3. 從JSON獲取數據,並報告「標題」和在HTML表格報告「說明」值

劃痕表例如:

<TABLE> 
<TR> 
<TD>NUMERO SINISTRO</TD> 
<TD>DATA SINISTRO</TD> 
<TD>MORE DATA> 
</TR> 
<TR> 
<TD>here goes "description" value for "NUMERO SINISTRO"</TD> 
<TD>here goes "description" value for "DATA SINISTRO"</TD> 
<TD>and so on...</TD></TR> 
</TABLE> 

有點遠遠超出我的能力...所以任何特定的提示可能會有所幫助。

+0

您需要進行身份驗證的示例鏈接是否可以使用公用URL提供數據示例? –

+0

這裏是完整的文件[鏈接](http://www.studiokaleya.it/mavenlinkapi/dati/stories.json) – user2513603

回答

0

請仔細閱讀this page,看看你是如何發展的。特別是「從外部文件讀取JSON」部分

+0

清除提示,它的作品。現在如何獲得「標題」和「描述」值並將它們發佈到特定的hmtl模板位置? – user2513603