I have to create dynamic object in angularJs.
I have a input object like below,
$scope.inputObj={
formName:"regForm", //this will be dynamic
fields:[]
}
i need to create a object with name "regForm" (this name will be dynamic).
Output should look like:
$scope.regForm={}; //here form name should be created as json object
$scope[$scope.inputObj.formName]={}