Question about structure types

anebo's picture

Hi All. Could anybody explain me the difference between these two structure outputs shown in attached image? Thanks a lot! :)

PreviewAttachmentSize
structure.png
structure.png22.27 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Bodysoulspirit's picture
Re: Question about structure types

I can't but does it makes a difference ? Have you having troubles ?

Swiftlikeninja's picture
Re: Question about structure types

one is an array and the other an object(named dictionary). if you noticed the differences in the ( vs. the ". The () indicate just a numerical value and the value will match the index of that entry. with the " the index is happenstance. the value between the quotations is the key of that entry. they could be named anything and the order is not necessary to be sorted like you have there. if you were to use a structure key member on the right structure you could call "23" and it would return that entry. imagine you have a structure instead of being "1", "2", "3", it was "x","y","z". now you can use key member to call the index that has the name X without regard to where in the structure it is.