I have a REST service which returns an arbitrary number of items which I'll use to populate a list item.
I need to show a unique image based on an identifier for each item in the REST response, and am trying to select the image with JavaScript in the Mapping Action Editor. In other words, for each unique identifier, I need to set the image source for the corresponding list item image.
I've tried all sorts of things - this code seems closest - but I'm still missing something:
function (value, element) {
switch (value) {
case 'case1':
element.attr('src', 'files/views/assets/image/image1.png').show();
break;
case 'case2':
element.attr('src', 'files/views/assets/image/image2.jpg').show();
break;
}
I even found this old reference to a very similar sounding problem,
https://getsatisfaction.com/apperyio/...
but still couldn't get it from there.
Please help