The function of the juxtaglomerular apparatus in the kidney is to

Asynthesize angiotensinogen
Bsecrete renin
Ccontrol phosphate excretion
Dregulate water reabsorption by the collecting duct

Correct answer: B. secrete renin

The juxtaglomerular apparatus in the kidney secretes renin, which is part of the renin-angiotensin system and plays a crucial role in regulating blood pressure.