I am trying to find each link value in different variables according to their name , like if name if facebook then facebooklink should filter , same lite twitter and all . But don't want to give index number . sometime fabook should be o index sometime twitter will be on 0 index . Please help
socialMediaDetails:
socialMediaDetail: Array(2)
0:
link: "[email protected]"
name: "twitter"
__typename: "SocialMediaDetail"
__proto__: Object
1:
link: "[email protected]"
name: "facebook"
__typename: "SocialMediaDetail"
__proto__: Object
2:
link: "[email protected]"
name: "linkedIn"
__typename: "SocialMediaDetail"
const socialMediaData=socialMediaDetails.socialMediaDetail;
const Steplabels = socialMediaData.filter((item) => {
return item.name === "twitter"
});
Thanks