How do I change the position spring value in the angular X drive of a configurable joint

I am trying to make a customs ragdoll using configurable joints and am trying to have the player press a button to go completely slack

        if(Input.GetButton("Flop"))
        {
            foreach(ConfigurableJoint j in joints2000)
            {
                j.angularXDrive.positionSpring = 0f;
            }
        }

this is my code so far but it throws a Cannot modify the return value of ‘ConfigurableJoint.angularXDrive’ because it is not a variable
error
any help is appreciated

Try to replace this code:

j.angularXDrive.positionSpring = 0f;

with this:

JointDrive jointDrive = j.angularXDrive;
jointDrive.positionSpring = 0f;
j.angularXDrive = jointDrive;

After all, JointDrive is a structure, so it is better to change it through another variable, which is this structure.