0

I need to iterate array dynamically.

//Function call
validateJsonArray(deptJson, "deptId", "deptValue");

function validateJsonArray(inputArray, objectId, objectValue){

for(int i=0; i<inputArray.length; i++){
    var selectedObjectId=inputArray[i].objectId;
.   Var  selectedObjectValue=inputArray[i].objectValue;
}

The above code gets selectedObjectId and selectedObjectValue as undefined

jt3
  • 9
  • 1

0 Answers0