Created
August 6, 2014 17:43
-
-
Save kevindb/ad533e1464389b18aff8 to your computer and use it in GitHub Desktop.
CF arrayStructKeyToList
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
public string function arrayStructKeyToList( | |
required array arr, | |
required string key | |
){ | |
local.response = ""; | |
if(len(arguments.key) gt 0){ | |
for(local.elem in arguments.arr){ | |
if(structKeyExists(local.elem, arguments.key)){ | |
local.response = listAppend(local.response, local.elem[arguments.key]); | |
} | |
} | |
} | |
return local.response; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment