Swift Error: Ambiguous reference to member 'subscript'
It means that "Pictures" is not a valid subscript. It looks like you are creating a constant named pictures
and you are trying to assign it a value of selectedRestaraunt["Pictures"]
and then trying to cast it as an NSArray
. If selectedrestaraunt
is already an array, then what goes in the []
brackets after selectedRestaraunt
should be an integer value which will refer to an index in the selectedRestaraunt
array. Obviosuly "Pictures" is not an integer, it is a string.
If you are trying to access an array within an array. Meaning that Pictures
is an array stored within the selectedRestaraunt
array then you can access it by using selectedRestaraunt[index of Pictures array]
where [index of pictures array]
is an integer which is equal to the index number in which the Picutres
array resides within the selectedRestaraunt
array