I am looking to dynamically create a JSON object named recipient-variables using two separate arrays - one for emails and the other for first names and IDs. How can I write JavaScript code to achieve this?
'recipient-variables': '{"[email protected]": {"first":"Alice", "id":1}, "[email protected]":{"first":"Bob", "id":2}}'