Well, good on you...
So was "getdata" (returned value) a Map, string - or what?
We really have no idea what you figured out and hence - it helps no one else (except yourself - answering your own question).
Please be kind enough to post your resolve (in more detail) since we all took (our) time to examine your question, before you "figure it out".
Thanks