Convert DYNAMIC IP to STATIC IP

Friends could help me with a script that can convert DYNAMIC IPs into STATIC IPs into DHCP SERVER LEASE IPs. Thanks for your help.

/ip dhcp-server lease print where [:if ($dynamic) do={make-static $“.id”}]