Created
August 23, 2012 09:34
-
-
Save milani/3434679 to your computer and use it in GitHub Desktop.
Best way to convert an accept type object to equv. string
This file contains hidden or 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
Best way to convert acceptType object to a string like below? | |
From: | |
var acceptTypes = { | |
'Images': ['*.png','*.jpg'], | |
'Documents': ['*.docx'] | |
} | |
To: | |
var acceptType = 'Images:*.png,*.jpg;Documents:*.docx' |
polotek
commented
Aug 23, 2012
@polotek lol i came up with the exact same solution (with the 2 semicolons you're missing, of course)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment