[Solved] i want to remove double quotes from a string without replace function
If I understood your requirement correctly, you can just use bracket notation like obj[‘a’].name var obj = { a: { “name”: “Emma” }, b: { “name”: “Harry” }, c: { “name”: “Jonny” } }; var ary = [‘a’, ‘b’, ‘c’] for (var i = 0; i < ary.length; i++) { console.log(obj[ary[i]].name) } Here you pass … Read more