[PATCH 3/6] util: json: Extract deflattening of keys into a separate function