I am trying to build JSON from two array. One array contains field_name and other contains field_value of corresponding field_name
var field_name = ["sys_id","country","calendar_integration","user_password","last_login_time"]
var field_value = ["6816f79cc0a8016401c5a33be04be441","United State","Outlook","Password1","2019-03-19 09:48:41"];
Expected output:
output = { "sys_id" : "6816f79cc0a8016401c5a33be04be441",
"country" : "United State",
"calendar_integration" : "Outlook",
"user_password": "Password1",
"last_login_time": "2019-03-19 09:48:41"
}
Anyone can help here, how to achieve this in JavaScript.