I have a js function that reads a JSON file and outputs them with a loop :
response.data.forEach((item,index)=>{
items += " <div class='eleman'>"
+ "<img src='"+item.teamMember.profileImageUrl+"' width='100%'>"
+ "<div class='content list'>"
+ "<div class='fullname'>"+item.teamMember.fullName+"</div>"+
...
There is an array on that json called customFields (item.teamMember.customFields) and it could have 0 to 7 indexes, example for one of them should be like :
id : 1202
name : Tags
type : SingleLineText
value : Composer,Music,Pan's Labyrinth
I want to get the value of the index that's name is ByLine. And use it under the full name div.
I tried several codes but they didn't work. Would appreciate if anyone can help.
item.teamMember.customFields?response.data.filter(item => item.name === "ByLine")?