we have an object otp in which we have key value pair, we need to loop over the object and call a function in which first para is the key and second param is the value. "otp" : { "reverse_qc_initiation" : "1234", "reverse_cancellation" : "2345" "reverse_reschedule" : "2345", },
Object.keys(otp).map(x => { fetch_otp(x, otp[x]); });