I have some objects like this: (wordpress attachment object)
attachment.sizes (which is an object and contains:)
.full (each contains height and width:)
.height
.width
.medium
.height
.width
.thumbnail
.height
.width
And then I have another object:
props.size (which is either "full","medium" or "thumbnail")
Can I in some way write similar to
attachment.sizes.(props.size).height
To get the height? (That did not work when I tried)
attachment.sizes[props.size].heightshould work.