add variable `var` to key 'f' of first element in JSON data `data`,data[0]['f'] = var