Current Events > For people who know Javascript, I have an array of like Objects right

Topic List
Page List: 1
Milkman5
12/05/17 3:50:47 PM
#1:


where each object has a Name value and so on.

How to I call on a specific one.

Like

Array[1]['Name']?
Array[1].Name?

How do I point to it?
... Copied to Clipboard!
Milkman5
12/05/17 3:59:52 PM
#2:


Lets say I want to get the value of the third objects name value
... Copied to Clipboard!
luigi13579
12/05/17 4:01:09 PM
#3:


I think there's more than one way. The second is the standard way in most languages, so presumably it's the same here.

The third object would be:

array[2].name
... Copied to Clipboard!
MacadamianNut3
12/05/17 4:02:27 PM
#4:


array[2] resolves to an object so you would just add .Name to get the attribute of that object

The first option you mentioned also should work

I don't use JavaScript often and close your account
---
XBL/Steam/R*/Uplay: Barinade88 | Origin: Barinade | BattleNet: Barinade#11210
Roll Tide & Go Irish
... Copied to Clipboard!
Topic List
Page List: 1