Skip to content
Advertisement

How to convert object data to dropdown options?

I have created two dropdowns and I am getting the back-end data. Here, I wat to display the list of websites and stores as dropdown.

JavaScript

I want option like:

JavaScript

Advertisement

Answer

Is that what you need? This pretty much is the same as your comment without the count.

JavaScript

EDIT

Here is a snippet that returns exactly the expected output

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement