Javascript – Access Object value in a string and compare
var siteList = {}; var siteInfo = []; var part_str = '[{"part":"00000PD","partSupplier":"DELL"}]'; var part = part_str.substring(1,part_str.length-1); eval('var partobj='+part ); console.log(partobj.part); console.log(partobj.partSupplier); The above code works fine. But I have to find out if the part number matches the following part;…