How to count the items in a structure

Hello, I'm trying to get the number of items in the structure pictured attached. Basically I need the number "3". I tried structcount(structure-name) but it doesn't seem to give me the correct values.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Edit:  Oops... Just realized you were referring to the structure key named "items", not "items" in the general sense ;-)   So the first example is all you need.

StructCount is only giving you the count of the outer structure.  

So what does the 3 represent, the number of elements inside "items"? If so, "items" contains an array, so you should use arrayLen(), ie

                     <cfset numOfItems = arrayLen( yourStructure.items )>

If you want to count the individual structures within that array, use StructureCount, but for each element, ie

                     <cfset firstCount = structCount( yourStructure.items[1] )>
                     <cfset secondCount = structCount( yourStructure.items[2] )>
                     <cfset thirdCount = structCount( yourStructure.items[3] )>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
brihol44Author Commented:
Sorry for the long delay. Haven't been actively working on things for a while.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ColdFusion Language

From novice to tech pro — start learning today.