Skip to content

Instantly share code, notes, and snippets.

@kevindb
Created August 6, 2014 17:43
Show Gist options
  • Save kevindb/ad533e1464389b18aff8 to your computer and use it in GitHub Desktop.
Save kevindb/ad533e1464389b18aff8 to your computer and use it in GitHub Desktop.
CF arrayStructKeyToList
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