In my project, there is a JSON file named "workers" which contains information about all the workers. I have created a select component to display the names of the workers like this:
https://i.sstatic.net/0Glyf.png
Currently, I am selecting some workers from the list and sending their names along with the work name to an API using a POST request as shown below:
https://i.sstatic.net/fwh8U.png
Instead of sending just the workers' names, I want to send their IDs as stored in the JSON file. The structure of the JSON looks like this:
https://i.sstatic.net/NMRvZ.png
For a working example, you can check out the Stackblitz demo here.