All,
I created a custom plugin, and all is working. I get back a JSONResponse from my Request.invokePluginService() call.
I can print out the json by dojo.toJson(response, true, " "); that of course prints out the keys and values of the JSON. But what are the dojo/javascript calls to pull out the json elements and values?
Does IBM post a reference? so far I can not find anything...
Answer by gone.fishing (1294) | Aug 29, 2016 at 04:33 PM
I don't know of a specific api but look at dojox.html.format.prettyPrint
it looks like that just manipulates the string. I guess I can do that.. I just thought I would find some JSON or other parsers to pull out data. I can use javascript string manipulation, it just so old school. :)
Answer by rkyker (575) | Aug 30, 2016 at 12:37 PM
The "response" parameter passed to your callback method is a JavaScript object that was parsed from the request response JSON text in ecm/model/Request.js.
When you called dojo.toJson(...), you converted the response object back to JSON text.
You can access the contents of the response object as you would any other JavaScript object:
response.someStringVar
response.someArrayVar[0]
If the JSON response is a JavaScript array, with no enclosing object:
response[0]
etc...
Content Navigator new PluginAction that opens a new browser window? 4 Answers
Does the IBM Content Navigator Mobile App support Single Sign On (SSO) authentication? 2 Answers
Content Navigator P8, how to use doc.getProperties() with Java 4 Answers
Is there a replacement for Daeja Viewer dependency on Java in Internet Browser 1 Answer