Find value in array
Hello,
I need to find a value within an array. In the code example below I need to find ID when Country=US. In this code example, the result I need is found at results2.releases[5].ID however the order and number of results in the array vary depending on the JSON returned. How do I loop over the results and find the ID when country = US?
As always appreciate any help!
Gary
<cfhttp method="get" url="http://musicbrainz.org/ws/2/recording/729cf505-94eb-4fbe-bc76-cbae44cff091?inc=artist-credits+isrcs+releases&fmt=json" result="httpResults2" throwonerror="Yes">
</cfhttp>
<cfset results2 = deserializeJSON(httpResults2.filecontent)>
<cfdump var="#results2#" />

