Thanks @xgerhard this seems to work, I totally forgot that it returns a list object. So if I wanted to iterate through the results and display ALL, what is the nightbot command to do a foreach loop?
Eg.
$(eval a = $(urlfetch json https://cnc.community/api/leaderboard/tiberian-dawn/players/search?search=$(query)); js = JSON.parse(a); for i in js: Player Name: ${i.player_name} | Rank: ${i.rank} | Wins: ${i.wins} | Losses: ${i.losses} | Points: ${i.points})