I would like to change the value of a recursive array.

One array provides the `path` to the variable to change:

`$scopePath` represents the path to change.

For example `if $scopePath==Array("owners","products","categories")`

and $tag="price";

I would like to change `$value["owners"]["products"]["categories"]["tag"]` to `true`

```
    $u=$value;
    foreach ($scopePath as $i => $s) {
        if (!isset($u[$s]))
            $u[$s]=Array();
        $u=$u[$s];
    }
    $u[$tag]=true;

```

I know the problem is because of the line $u=$u[$s] because this changes the reference to $u, but I don't know how to fix it.
['https://Stackoverflow.com/questions/17041685', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1993501/']
Swift 3 Version of Kev's answer to return blurred image -

```
func blurBgImage(image: UIImage) -> UIImage? {
        let radius: CGFloat = 20;
        let context = CIContext(options: nil);
        let inputImage = CIImage(cgImage: image.cgImage!);
        let filter = CIFilter(name: "CIGaussianBlur");
        filter?.setValue(inputImage, forKey: kCIInputImageKey);
        filter?.setValue("\(radius)", forKey:kCIInputRadiusKey);

        if let result = filter?.value(forKey: kCIOutputImageKey) as? CIImage{

            let rect = CGRect(origin: CGPoint(x: radius * 2,y :radius * 2), size: CGSize(width: image.size.width - radius * 4, height: image.size.height - radius * 4))

            if let cgImage = context.createCGImage(result, from: rect){
                return UIImage(cgImage: cgImage);
                }
        }
        return nil;
    }

```
If adds a dark blur view for tableView, this will beautifully make it:

```
tableView.backgroundColor = .clear
let blurEffect = UIBlurEffect(style: .dark)
let blurEffectView = UIVisualEffectView(effect: blurEffect)
blurEffectView.frame = tableView.bounds
blurEffectView.autoresizingMask = [.flexibleHeight, .flexibleWidth]

// Assigning blurEffectView to backgroundView instead of addSubview to tableView makes tableView cell not blocked by blurEffectView 
tableView.backgroundView = blurEffectView

```