Skip to main content
Participant
Jun 18, 2019 10:20 PM UTC
Question

Pulling Out Struct Variables

Newbie question here… how do I get / set these values in this (sub)Struct to variables?

In the end, I want to have them set to variables like:

<cfset CategoryID = StructVar>
<cfset CategoryName = StructVar>

Thanks!

    This topic is closed to new replies. Start a new post to keep the conversation going.

    3 replies

    Participant
    Jun 19, 2019 8:10 AM UTC

    Actually ended up figuring this one out.

    I used:

    <cfset CategoryID =i.category.id>
    <cfset CategoryName =i.category.name>

    Since my CFLOOP over this array is:

    <cfloop array="#deserialized#" index=“i”>

    Translate
    WolfShade
    Legend
    Jun 19, 2019 1:05 PM UTC

    I was going to say that it depends upon what you named the struct, but you did, indeed, figure it out.

    V/r,

    ^ _ ^

    Translate