【发布时间】:2014-01-15 11:16:51
【问题描述】:
之前我使用的是以下格式的 json 文件:
[{"lat":43.788458853157117,"lng":-79.282781549043008,"category":"volunteer","name":"Rita","url":"", "description":"xxx is a member of 13"},{"lat":43.7,"lng":-79.4,"category":"organization","name":"TCAN","url":"http://tcan.ca","description":"Lorem ipsum"}]
现在我正在尝试从 Drupal 站点生成 json 文件并获得以下结构。如何引用最低级别的字段。我查看了使用 d3.net 的示例,但没有找到任何适用的示例。
{
"organizations": [
{
"member": {
"field_category": "organization",
"body": "A network of organizations in Toronto devoted to climate change mitigation and adaptation.",
"URL": "xxx.ca",
"title": "Toronto Climate Action Network",
"field_lat": 43.7,
"field_long": -79.4
}
},
{
"member": {
"field_category": "abc",
"body": "xxx.",
"URL": "",
"title": "yyy",
"field_lat": 43.7,
"field_long": -79.28
}
}
]
}
【问题讨论】:
标签: javascript arrays json d3.js