JSON.decode should have been JSON.parse