Created
February 25, 2019 18:42
-
-
Save rana01645/08182baf0880100fc13525c6d7b5c717 to your computer and use it in GitHub Desktop.
Get select dropdown by using jquery as json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = $('#proxy_country option'); | |
var values = $.map(options ,function(option) { | |
return '{"name":"'+option.text+'","alpha2Code":"'+option.value+'"}'; | |
}); | |
JSON.stringify(values.join(',')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment