Step 1: Write the formula of magnetic moment.
Magnetic moment of a current loop is given by:
\[
M = iA
\]
where \(A\) is the area of the loop.
Step 2: Express area for a circular loop.
For a circle of radius \(r\),
\[
A = \pi r^2
\]
So,
\[
M = i\pi r^2
\]
Step 3: Find radius \(r\) in terms of \(M\).
\[
r^2 = \dfrac{M}{i\pi}
\Rightarrow r = \sqrt{\dfrac{M}{i\pi}}
\]
Step 4: Find the length of wire.
Length of wire = circumference of loop
\[
L = 2\pi r
\]
Substituting \(r\),
\[
L = 2\pi \sqrt{\dfrac{M}{i\pi}}
= \sqrt{\dfrac{4\pi M}{i}}
\]
Final Answer:
\[
\boxed{\sqrt{\dfrac{4\pi M}{i}}}
\]