I have a list as below:
var myList = [{type:'Prospect__c', typeName__c:'high_school', },
{type:'Procedure__c', typeName__c:'in_program', },
{type:'Procedure__c', typeName__c:'attention_plz', }]
I want to check if in_program
(which is present in my list), exists in my list or not?
I've used different types of codes in order to get the result but I did not succeed.
Here are some of my tries:
if (myList.indexOf('in_program')>0)
if (myList.indexOf(typeName__c:'in_program')>0)
if (myList.indexOf(" typeName__c:'in_program' ")>0)