繁体   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