Work with wp api and get name by id in ionic

i have music site and in api have artists and songs router : /wp-json/wp/v2/artists /wp-json/wp/v2/songs

in songs - evry songs has artist field that store Song’s artists id

i want by gettings songs the artist’s id of songs convert to artist name

i find this from a tutorial but not work


let artist_name:string ='';
this.api.Artists.forEach(element =>{
  if ( === artist_id){
    artist_name =;

  return artist_name;