Page 1 of 1

Image in feed capture with js match

Posted: Tue Sep 20, 2016 2:05 pm
by Johnny6773854

Hi, this topic is closed. But how do I capture this in if function if no image was foud.

_______________________

Oleg Danchenkov (Employee) over 3 years ago
You should add mapping from rss-channel-item-encoded to image-Asset parameter and add this JS code to mapping

Code: Select all

var img = value.match(/]*/)[0]; 
 var imgSrc = img.match(/ src=["']([^"']+)["']/)[1]; 
 return imgSrc;  

Image in feed capture with js match

Posted: Tue Sep 20, 2016 2:48 pm
by Illya Stepanov

You can write an JavaScript "if" statement in the mapping JS fields too.
Check out here: https://docs.appery.io/docs/appbuilde...


Image in feed capture with js match

Posted: Tue Sep 20, 2016 3:47 pm
by Johnny7459624

Awesome thank you!