Use JSON for array deletion.

Change-Id: Ia8ae051547c23add4ce5410792670794010968c3