从集合中获取单个对象

时间:2017-05-14 20:35:26

标签: javascript

这是我收集的集合:

    Collection {
  '313413509125898240' => MessageAttachment {
  message:
   Message {
     channel: [Object],
     id: '313413509616500736',
     type: 'DEFAULT',
     content: '',
     author: [Object],
     member: [Object],
     pinned: false,
     tts: false,
     nonce: null,
     system: false,
     embeds: [],
     attachments: [Circular],
     createdTimestamp: 1494794003634,
     editedTimestamp: null,
     reactions: Collection {},
     mentions: [Object],
     webhookID: null,
     hit: null,
     _edits: [] },
  id: '313413509125898240',
  filename: 'eJwFwdENhCAMANBdGIC2oIhuQ5BUcgqE9r4ut7vv_cx33uYwl-qQA-Cskvs8rWifiYvl3vkuaVSxuT-QVFO-ntJUwOMe3UbeIVLc.png',
  filesize: 8217,
  url: 'https://cdn.discordapp.com/attachments/305909472486883330/313413509125898240/eJwFwdENhCAMANBdGIC2oIhuQ5BUcgqE9r4ut7vv_cx33uYwl-qQA-Cskvs8rWifiYvl3vkuaVSxuT-QVFO-ntJUwOMe3UbeIVLc.png',
  proxyURL: 'https://images.discordapp.net/.eJwFwdtugjAYAOB34R5a-MtsvUOiC8ZDiIPFq6UrXSEixZ4wMb77vu8VeTNG66h3brZrhLrBCm26xDptuJKJ0lqNks-DTYS-I-4cF_1dTs4iwDnDjKwyQj8oBQCMIAWSQo5ZmuWU0YxgJPfLbum2p74sjsVp031WZaar3tf5phHqsWWGeLcK4Uc8Afx1GeNHXcSlvQVLzffwN1zDCOHmeXt5-q-4bnfneH
L7ZjkfJTS_smoPIpknFb3_AUVEQmA.36y13a_Z5MKnziL-pVQy3r_E_LU',
  height: 112,
  width: 112 } }

我想要console.log()那个唯一的URL部分。但无法找到明确说明如何做到这一点的任何地方

1 个答案:

答案 0 :(得分:0)

的console.log(Collection.url)

我认为这应该有用