Can someone help me with the code below. I want to make an api call and parse the returned JSON object to return an attribute.
The returned JSON object is below and I would like to parse out the T-Score.
{“Form”:[
{“Theta”:"-0.0809592429844071",“StdError”:“0.386368540487446”,“T-Score”:“49”,“SError”:“4”,“ItemCount”:“4”,“ItemErrors”:""}
]
}
The code below returns the complete object, I am trying to figure out how the response-mapping works.
Based on the json object about, I thought [“Form” 0 “T-Score”] would return 49.
Any help with the syntax would be greatly appreciated!
script below
…
(make-api-call api-call_0)
…
api-call_0
{:chat-display true,
:url
“http://www.assessmentcenter.net/AC_API/2013-01/Scores/795B07C1-067E-4FBD-9B60-A57985E69B5D.json?Sleep116=Quite a bit&Sleep20=A little bit&Sleep44=Not at all&Sleep109=Poor”,
:type :api-call,
:request-type “get”,
:headers
[{:id “header-2”,
:name “Authorization”,
:value
{:type “text”,
:value
“Basic xxxxxx==”}}],
:body [],
:response-mapping
[{:attribute {:name “value”, :type “text”},
:path [“Form” 0 “T-Score”]}]}
])