coldfusion - Find value in array of structs -
i have array of structs in script, , need check inside entire array of structs if somewhere inside struct, "id" key has specific value.
i loop, there better/faster way this? note needs compatible coldfusion 8, arrayfind not available.
as peter suggests, it's hard given paucity of info provided, if key value unique in data structure, use structfindvalue()
locate it. challenge here not pay attention key value in. not know adobe / macromedia thinking in providing structfindkey()
, structfindvalue()
, no structfindkeyvalue()
.
on whim checked cflib see if there udf cover ground. not there one, seems wrote (my memory sieve sometimes): structfindkeywithvalue()
. that's written cf9, shouldn't take back-port cf8.
this bit of general answer. if provide better info, can give better answer.
Comments
Post a Comment