How to convert the below ACC/JavaScript array code in the AJO?
var secFour = [
{language:"englishVer", linetext:"Got Questions?"},
{language:"spanishVer", linetext:"¿Tienes Dudas?"},
{language:"frenchVer", linktype:"oca", linetext:"Avez-vous des Questions?"},
{language:"englishCaVer", linetext:"Got Questions?"},
{language:"englishVer", linetext:"Chat with our agents to get quick help"},
{language:"spanishVer", linetext:"Chatea con nosotras para obtener ayuda rápida"},
{language:"frenchVer", linetext:"Discutez avec nous pour une aide rapide"},
{language:"englishCaVer", linetext:"Chat with our agents to get quick help"}
];
var footerChatText = secFour.filter (function (textitem) {
return textitem.language == langVar
});
<h3><% document.write(secFour[langVar]);%></h3>
Solved! Go to Solution.
Views
Replies
Total Likes
@NiteshSingh
try this :
{{
var secFour = [
{language:"englishVer", linetext:"Got Questions?"},
{language:"spanishVer", linetext:"¿Tienes Dudas?"},
{language:"frenchVer", linetext:"Avez-vous des Questions?"},
{language:"englishCaVer", linetext:"Got Questions?"},
{language:"englishVer", linetext:"Chat with our agents to get quick help"},
{language:"spanishVer", linetext:"Chatea con nosotras para obtener ayuda rápida"},
{language:"frenchVer", linetext:"Discutez avec nous pour une aide rapide"},
{language:"englishCaVer", linetext:"Chat with our agents to get quick help"}
];
var langVar = replace with language preference attribute;
var footerChatText = secFour.filter(function(textitem) {
return textitem.language === langVar;
});
footerChatText.length > 0 ? footerChatText[0].linetext : ''
}}
Views
Replies
Total Likes
@NiteshSingh
try this :
{{
var secFour = [
{language:"englishVer", linetext:"Got Questions?"},
{language:"spanishVer", linetext:"¿Tienes Dudas?"},
{language:"frenchVer", linetext:"Avez-vous des Questions?"},
{language:"englishCaVer", linetext:"Got Questions?"},
{language:"englishVer", linetext:"Chat with our agents to get quick help"},
{language:"spanishVer", linetext:"Chatea con nosotras para obtener ayuda rápida"},
{language:"frenchVer", linetext:"Discutez avec nous pour une aide rapide"},
{language:"englishCaVer", linetext:"Chat with our agents to get quick help"}
];
var langVar = replace with language preference attribute;
var footerChatText = secFour.filter(function(textitem) {
return textitem.language === langVar;
});
footerChatText.length > 0 ? footerChatText[0].linetext : ''
}}
Views
Replies
Total Likes
Hi @NiteshSingh,
Was the given solution by @AJODev helpful to resolve your query?
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies