I have an array like
vendors = [{ Name: \'Magenic\', ID: \'ABC\' }, { Name: \'Microsoft\', ID: \'DEF\' } // and so on... ];
I would rather go with regex.
If your code is as follows,
vendors = [ { Name: 'Magenic', ID: 'ABC' }, { Name: 'Microsoft', ID: 'DEF' } ];
I would recommend
/"Name":"Magenic"/.test(JSON.stringify(vendors))