Forum Discussion
I have found that RightNow has a standard JSON.parse function. So, I can convert JSON into arrays, and get the length
like
var decodedStr = RightNow.JSON.parse(o.responseText);
var newdata=decodedStr.response
var length= newdata.messages.message.length;
Thanks
Hello All,
I have some follow up questions.
1. Is there any ways for bring back only "accepted solution" response as a JSON object?
According to the post here, it explain that it will need to threadID to make other calls. Like:
http://<your community domain path>/restapi/vc/threads/id/thread_id .
We would like avoid these complex implementation in RightNow end and also do not want increase RESETAPI page views. BT has a perfect implementation in this case: http://bt.custhelp.com/app/home
2. Get lastest "Accepted Solutions" VIA JSON object.
Can we get the accepted solutions response as a JSON object, not XML
http://lithosphere.lithium.com/t5/Customer-Connection-Private/Accepted-Solutions-via-REST/td-p/18648
If yes, how the URL should look like?
Thanks,
Qing Liu
- AdamN14 years agoKhoros Oracle
Hi Qing,
I'd suggest taking a look at the solutions/recent method on the Community object. I think this will give you what you're looking for. Here what the call looks like:
<your base community URL>/restapi/vc/solutions/recent
To get it as a JSON object, append the query string parameter:
xslt=json.xsl
So putting it all together, it would look like:
<your base community URL>/restapi/vc/solutions/recent?xslt=json.xsl
I hope this helps! Let me know if this didn't answer your questions.
Related Content
- 12 years ago