簡體   English   中英

使用javascript / coffee和d3.json拼合json文件

[英]flattened json file using javascript / coffee with d3.json

我正在嘗試展平並合並json中的值,這是json

https://api.github.com/repos/wesm/D3py/commits

我已成功使用以下咖啡代碼按位置提取每個咖啡

d3.json "https://api.github.com/repos/wesm/D3py/commits", (data) -> 
  console.log data[0].commit.author.name
  return 

但是當我嘗試執行以下操作時,我希望看到名稱數組,但一無所獲,

 d3.json "https://api.github.com/repos/wesm/D3py/commits", (data) -> 
  names = (name for name in data.commit.author.name)
  console.log names
  return
names = (entry.commit.author.name for entry in data)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM