Trouble searching through an API command

I’m tiring to search through my host list for a specific IP address and have the details show up in my browser.

This is the code I have that give me all devices in the host list.

$API->write(‘/ip/hotspot/host/getall’);
$ARRAY = $API->read(‘’);

print_r($ARRAY);


I have tried several solutions I have found online but none of them work.
write(‘/ip/hotspot/host/getall . address=192.168.16.19)
write(’/ip/hotspot/host/getall/address=192.168.16.19)
write(‘/ip/hotspot/host/getall’ ‘192.168.16.19=address’)

Any help would be great.