Fairly easy. Left rear in my case, I also repaired the pivot of the left front.
Doing it properly you need to split the cases to desolder and resolder the wires, etc. etc. PHOTOGRAPH the wiring layout BEFORE you desolder anything. I bought a leg and motor assembly.
You might be able to bodge it by cutting the wires and swapping just the arm but I have no idea how difficult that approach would be and I DO NOT think it would be a better job.
I think that if you bought a bare arm you will also HAVE TO desolder / resolder any LED and or antennae boards at the arm's outer end.
With front legs, to remove and refit the pivot, move the arm and or its pivot into the position where it is 'half way' between the flying position and the storage position and where it 'sticks'. This puts the actual pivot in position such that it is easy to remove and refit i.e. the pivot exerts no force on the arm).
THERE IS A BLACK WASHER / SPACER THAT SITS BETWEEN THE TOP OF THE ARM AND THE DRONE'S BODY, be careful not to lose it and to remember to refit it.
The snapping of the arm into the storage or flying postion is caused by a spring loaded cam and folllower assembly inside the pivot. The "half way" position has the spring fully compressed, if there will be a signifcant delay between removing and refitting the arm then twist the pivot one way or other so that it pivot snaps to either the flying or storage position and reduces the compression of the spring. You may need pliers etc. to twist the pivot into the "half way" position for refitting.
At the top of the actual pivot there is a protruding 'shaft', check that this looks axially straight and is NOT leaning to one side, mine was 'leaning' but with care I was able to straighten it. This shaft mates with a hole in the body of the drone and with the shell opened you can see the end of this shaft. When the end of the shaft was off centre in this hole the arm's outer end 'hung low' in my case. If the shaft is badly bent then it is probably wiser to replace the pivot.
With the rear legs, there is an internal, radial lug on the inner end of the arm's pivot shaft. To remove and refit the arm this lug must align with a groove in the bore of the pivot, the lug and groove are aligned when the arm in the storage position. If you are replacing a rear arm and there is no lug on the end of the arm's pivot shaft (it is apparently a common breakage point) then you will have to remove the black pivot 'assembly' from inside the drone and look for the broken off lug.
In use and properly fitted this lug slides along a circumferential groove in the pivot's bore, it acts as a travel limiter at both ends of its travel as well as a storage detent locker in the storage postion.
The lug of my left rear arm was broken off and was stuck, by grease, at one end of the above circumferential groove.