![](/img/trans.png)
[英]How to print a dataset from a url using d3.json() javascript?
[英]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.