> On 7 Nov 2015, at 20:48, Roland King wrote:
>
> Quincey explained why it doesn’t work, value semantics run deep and
> consistent in Swift.
>
> What you could do if you wanted, after messing with images, put it back into
> the json dictionary again, after your for var image in .. code
>
>
Quincey explained why it doesn’t work, value semantics run deep and consistent
in Swift.
What you could do if you wanted, after messing with images, put it back into
the json dictionary again, after your for var image in .. code
json[ “images” ] = images
now you have modified json to have a n
On Nov 6, 2015, at 22:54 , Rick Mann wrote:
>
> if var images = json["images"] as? [[String:AnyObject]]
No, that won’t work because Swift dictionaries have *value* semantics, so
you’re *asking* for a copy here. The same thing in Obj-C works because the
variable ‘images’ would be a reference.