0

This is the collection im getting:

    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 } }

I want to console.log() the URL Section of that ONLY. But can't find anywhere that clearly states how to do this

Cake
  • 33
  • 5
  • Try console.log(Collection['313413509125898240'].url); This should do the job. I assume that `Collection` is the name of the variable holding the associative array that you've mentioned in your question – marius_neo May 14 '17 at 20:46

1 Answers1

0

console.log(Collection.url)

I think this should work

Ian.V
  • 345
  • 3
  • 19