Hi Folks
I understand that %asset_assetid^as_asset:asset_name% returns the name but, if I have the asset as a string id how would I achieve the same
For example what I am trying to achieve
“Parent name - Child name”
Below is the code I am using to try this
|||
SCRIPT
const assets = %asset_metadata_psccapabilities^json_decode^as_asset:asset_name,asset_url,asset_assetid,asset_parent%;
if(assets.length > 0){
document.write('<ul>')
assets.forEach(function(asset){
document.write('<li>'+asset.asset_parent+' - '+asset.asset_name+ '</li>');
});
document.write(’</ul’);
}
/SCRIPT
|||
thank you for you time
pw