The CreatorCon Call for Content is officially open! Get started here.

PrashantLearnIT
Giga Sage

Hello Everyone,

 

Because of an ask, I was looking for a way to identify a CMDB_CI class hierarchy. Came across this cool API SN provides – TableUtils().

https://developer.servicenow.com/app.do#!/api_doc?v=newyork&id=r_TU-TableUtils_S

getTables() interested me because it was exactly what I needed. Turns out the array it returns is a Java Array. Unusable if you’re doing some JS stuff on that array. And, hence it was for the first time, I used j2js(). [Java to JavaScript]. Like jsArray = j2js(jArray);

Have a look at some of the methods provided by j2js - https://developer.servicenow.com/app.do#!/api_doc?v=newyork&id=r_J2js-j2js_O 

If you're looking for ways to handle Java object returns in ServiceNow, j2js is here to help!

 

If my content helped you in anyway, please mark this content as BOOKMARK, SUBSCRIBE & HELPFUL

 

Best Regards,

Prashant Kumar (LearnIT)

 

YouTube Channel LearnIT: https://www.youtube.com/@learnitwithprashant

Blog LearnIT: https://medium.com/@LearnITbyPrashant

Prashant Kumar LinkedIn: https://www.linkedin.com/in/learnitbyprashant/

ServiceNow Community Prashant Kumar - https://www.servicenow.com/community/user/viewprofilepage/user-id/19635