Basically I have a json say..
collectionData = {'customerName':'Ashish','phone':'1234567'}
Now I have an array containing json fieldnames like..
array = ['customerName','phone'];
Now I want to perform this operation :
for (let i = 0; i < array.length; i++) {
console.log(collectionData.array[i]);
}
Why this code is giving me error? Thanks is advance