Coldfusion trick we did to find values in array

In coldfusion I didnt find function to find values within array. Requirement was to look wheather specific value is present or not. Such function is present in PHP.

I look for various implmentation and I though structure could solve this issues. And magic logic works. Let me explain you what we did

-We received array, we converted it to the structure.
-Each value from the array is now treated as key in structure
-At the end we used structKeyExists function.

This way we achieved the functionality that we need.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: