Skip to main content
Inspiring
Jul 17, 2019 2:48 AM UTC
Answered

Get data from deserializeJSON

I am a bit lost on how to get the data out of a structure created from deserializeJSON. I am trying for example to set Results = data / array1 / doc / m.

So along the lines of <cfset results = #data.doc.m[1]#> but that's not right... What's the proper way to do this?

When I dump the results the look like:

    This topic is closed to new replies. Start a new post to keep the conversation going.
    WolfShade
    WolfShadeCorrect answer
    Legend
    Jul 17, 2019 2:04 PM UTC

    It's been a while since I've worked with JSON, but try:  data[1].doc.m

    V/r,

    ^ _ ^

    6 replies

    WolfShade
    WolfShadeCorrect answer
    Legend
    Jul 17, 2019 2:04 PM UTC

    It's been a while since I've worked with JSON, but try:  data[1].doc.m

    V/r,

    ^ _ ^

    Translate
    ghanna1Author
    Inspiring
    Jul 17, 2019 2:18 PM UTC

    Thanks!  That did it.

    Translate
    WolfShade
    Legend
    Jul 17, 2019 2:37 PM UTC

    Awesome!  Glad I could actually remember that.  And glad that you got it working.

    And thank you for marking my answer as correct.  I do appreciate it.

    V/r,

    ^ _ ^

    Translate