I have an object in two other objects named formKeyValues
and form
formKeyValues
form
I want to push only the keys and values from formKeyValues
in a new array parameter
- keys are in form.formKeys
-
I tried this but it's not working.
this.formKeyValues=this.selectedTimeLine.formKeyValues;
this.parameter=[];
this.formKeyValues.forEach((para)=>{
if(para.key==this.selectedTimeLine.form.formKeys){
this.parameter.push('d[/data/'+this.selectedTimeLine.form.formId+'/'+para.key+']='+para.value);
}
});