Khoros Atlas Logo

%3CLINGO-SUB%20id%3D%22lingo-sub-533752%22%20slang%3D%22en-US%22%3EGetting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-533752%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20to%20get%20a%20V1%20API%20call%20back%20in%20a%20format%20that%20I%20can%20use%20as%20JSON%20in%20Javascript%20in%20a%20component.%20How%20do%20I%20do%20that%3F%20For%20example%3A%3C%2FP%3E%3CP%3E(%2Fcategories%2Fid%2FcategoryName%2Flabels)%3C%2FP%3E%3CPRE%3E%3CSPAN%3E%26lt%3B%23assign%20%3C%2FSPAN%3E%3CSPAN%3EsomeLabels%20%3C%2FSPAN%3E%3D%20%3CSPAN%3Erestadmin%3C%2FSPAN%3E(%3CSPAN%3E%22%2F%3C%2FSPAN%3E%3CSPAN%3E%24%7B%3C%2FSPAN%3E%3CSPAN%3Econtext%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3CSPAN%3E%2Fid%2F%3C%2FSPAN%3E%3CSPAN%3E%24%7B%3C%2FSPAN%3E%3CSPAN%3EcontextId%3C%2FSPAN%3E%3CSPAN%3E%7D%3C%2FSPAN%3E%3CSPAN%3E%2Flabels%3Frestapi.response_format%3Djson%22%3C%2FSPAN%3E).%3CSPAN%3Elabels%3C%2FSPAN%3E.%3CSPAN%3Elabel%3C%2FSPAN%3E%3CSPAN%3E%3F%3C%2FSPAN%3E%3CSPAN%3Esort_by%3C%2FSPAN%3E(%3CSPAN%3E%22text%22%3C%2FSPAN%3E)%2F%26gt%3B%3CBR%20%2F%3E%3CSCRIPT%3E%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Blet%20someVar%20%3D%20%5B%24%7BsomeLabels%7D%5D%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fscript%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FPRE%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BI%20know%20that%20V2%20has%20the%20apiv2.toJson()%20method%2C%20but%20in%20this%20case%20V1%20is%20the%20only%20way%20I%20know%20of%20to%20get%20a%20list%20of%20labels%20from%20a%20category%2C%20for%20example.%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-537311%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-537311%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThanks%20for%20all%20your%20help.%20Shouldn%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20have%20been%20that%20hard%20to%20begin%20with%20but%20...%20some%20things%20are%20just%20a%20pain%20in%20Khoros%20Community...%20Thanks%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-535803%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-535803%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BGreat!%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BHope%20everything%20works%20as%20you%20want%2C%20now.%20Requesting%20the%20endpoint%20via%20AJAX%20from%20a%20component%20shouldn%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20be%20that%20difficult%20from%20this%20point.%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Fhtml%2Femoticons%2F1f642.png%22%20alt%3D%22%3Aslightly_smiling_face%3A%22%20title%3D%22%3Aslightly_smiling_face%3A%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-535684%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-535684%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3BThanks!%20I%20just%20added%20a%20few%20things%20to%20it%20to%20get%20it%20to%20work%20100%25%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23attempt%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2Fcategories%2Fid%2Fdiscovery%2Flabels%3Frestapi.response_format%3Djson%22).labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23if%20someLabels%3F%3F%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%20someLabels%3Fsize%20gt%200%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22status%22%3A%20%22successful%22%2C%0A%20%20%20%20%20%20%20%20%22labels%22%20%3A%20%5B%0A%20%20%20%20%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23list%20someLabels%20as%20label%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%22id%22%3A%22%24%7Blabel.id%7D%22%2C%22text%22%3A%22%24%7Blabel.text%7D%22%7D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23if%20(label%3Fhas_next)%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%2C%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23else%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22status%22%3A%20%22empty%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23recover%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22status%22%3A%20%22error%22%2C%0A%20%20%20%20%20%20%20%20%22message%22%3A%20%22%24%7B.error%3Fjson_string%7D%22%2C%0A%20%20%20%20%20%20%20%20%22query%22%20%3A%20%22%24%7BqueryMsg%3Fjson_string%7D%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-535658%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-535658%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40IanAtJMP%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20-%20Ok.%20Good%20to%20know%20that%20you%20want%20your%20endpoint%20to%20return%20JSON%20which%20than%20can%20be%20requested%20by%20your%20components.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BYou%20could%20use%20something%20like%20this%20to%20build%20your%20endpoint%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23attempt%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2Fcategories%2Fid%2Fdiscovery%2Flabels%3F%20restapi.response_format%3Djson%22).labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23if%20someLabels%3F%3F%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%20someLabels%3Fsize%20gt%200%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%22status%22%3A%20%22successful%22%2C%0A%20%20%20%20%20%20%20%20%20%22labels%22%20%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23list%20someLabels%20as%20label%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%22%24%7Blabel.text%7D%22%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23if%20(label%3Fhas_next)%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%2C%0A%20%20%20%20%20%20%20%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2F%23list%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23else%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22status%22%3A%20%22empty%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23recover%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%7B%0A%20%20%20%20%22response%22%3A%20%7B%0A%20%20%20%20%20%20%22status%22%3A%20%22error%22%2C%0A%20%20%20%20%20%20%22message%22%3A%20%22%24%7B.error%3Fjson_string%7D%22%2C%0A%20%20%20%20%20%20%22query%22%20%3A%20%22%24%7BqueryMsg%3Fjson_string%7D%22%0A%20%20%20%20%7D%0A%20%20%7D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThis%20should%20always%20return%20a%20JSON%20object%20from%20your%20endpoint.%20You%20should%20test%20your%20endpoint%20by%20directly%20accessing%20its%20Url%2C%20to%20see%20if%20things%20work%20as%20expected.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534724%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534724%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35556%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40cike%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3BThanks%2C%20yes%2C%20that%20is%20correct.%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BHowever%2C%20the%20issue%20is%20that%20I%20can%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20get%20the%20endpoint%20to%20show%20up%20in%20JSON%3F%20If%20it%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20not%20JSON%20in%20the%20endpoint%20itself%2C%20how%20am%20I%20going%20to%20call%20that%20in%20a%20component%20and%20expect%20JSON%3F%20That%20make%20sense%3F%20Thanks%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Fhtml%2Femoticons%2F1f642.png%22%20alt%3D%22%3Aslightly_smiling_face%3A%22%20title%3D%22%3Aslightly_smiling_face%3A%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BI%20guess%20the%20question%20is%20then%2C%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3Bhow%20do%20I%20get%20an%20endpoint%20to%20return%20JSON%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534332%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534332%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40IanAtJMP%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20-%20Maybe%20we%20should%20go%20a%20step%20back%20and%20see%20if%20I%20understand%20your%20scenario%20in%20the%20right%20way%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Fhtml%2Femoticons%2F1f60a.png%22%20alt%3D%22%3Asmiling_face_with_smiling_eyes%3A%22%20title%3D%22%3Asmiling_face_with_smiling_eyes%3A%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BYou%20fetch%20labels%20of%20a%20node%20in%20an%20endpoint%20and%20want%20to%20access%20them%20via%20JS%20from%20a%20custom%20component%2C%20is%20that%20correct%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIf%20so%2C%20I%20recommend%20the%20following%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BOL%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BLI%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BFetch%20and%20process%20labels%20in%20the%20endpoint%20as%20you%20want%20and%20let%20the%20endpoint%20return%20JSON.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FLI%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BLI%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BUse%20JS%20in%20a%20custom%20component%20to%20request%20your%20endpoint%20and%20handle%20your%20response%20(%20%3D%20the%20labels)%20from%20there%20on.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FLI%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FOL%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIf%20I%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bm%20wrong%2C%20it%20would%20be%20great%20if%20you%20could%20describe%20your%20intention%2C%20so%20I%20can%20figure%20out%20how%20to%20go%20on.%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20class%3D%22lia-deferred-image%20lia-image-emoji%22%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Fhtml%2Femoticons%2F1f642.png%22%20alt%3D%22%3Aslightly_smiling_face%3A%22%20title%3D%22%3Aslightly_smiling_face%3A%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534295%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534295%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BI%20did%20use%20the%20snippet%20but%20it%20didn%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20print%20anything.%20When%20I%20removed%20the%20comment%20marks%2C%20did%20print%20in%20the%20enpdoint.%20Still%20can%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20get%20it%20into%20JS%20tho.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534264%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534264%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThe%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%24%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%20sign%20shouldn%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20bother%20you.%20You%20can%20access%20the%20text%20or%20id%20value%20of%20labels%20as%20I%20mentioned.%20Freemarker%20handles%20this%20for%20you.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BDid%20you%20try%20the%20snippet%20I%20provided%20to%20test%20your%20someLabels%20variable%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIf%20this%20snippet%20works%20and%20will%20print%20some%20data%2C%20you%20can%20be%20sure%20your%20request%2Fresponse%20is%20correct%20and%20there%20are%20maybe%20some%20limitations%20on%20accessing%20the%20object%20as%20you%20tried%20in%20your%20JS%20code.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534222%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534222%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIt%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20still%20the%20line%20JSON.parse()%20that%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20giving%20me%20the%20issue.%20And%20%24%7Blabel.text%7D%20won%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20print%20because%20it%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20not%20actually%20a%20text%20node%2C%20it%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20an%20object%2C%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%24%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%20has%20the%20text%20...%20whew.%20Too%20confusing.%20Thanks%20tho.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534221%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534221%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40IanAtJMP%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20-%20You%20could%20check%20if%20your%20request%20results%20in%20a%20non-empty%20list%20of%20labels%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23if%20someLabels%3F%3F%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3B%20someLabels%3Fsize%20gt%200%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20Print%20%24%7BsomeLabels%3Fsize%7D%20here%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23list%20someLabels%20as%20label%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20Print%20%24%7Blabel.text%7D%20here%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2F%23list%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2F%23if%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BOr%20you%20simple%20test%20your%20request%20through%20the%20browser%20or%20via%20other%20tools%20(curl%2C%20Postman).%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIs%20it%20still%20the%20line%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bvar%20labels%20%3D%20JSON.parse('%24%7BsomeLabels%7D')%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bwhich%20causes%20the%20error%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534172%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534172%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThat%20didn%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20seem%20to%20make%20any%20difference%20either.%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2Fcategories%2Fid%2Fdiscovery%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22).labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bscript%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20var%20labels%20%3D%20JSON.parse('%24%7BsomeLabels%7D')%3B%0A%20%20console.log('labels'%2Clabels)%3B%0A%20%20%3C%2FSCRIPT%3E%3C%2FPRE%3E%3CP%3ESame%20error.%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20idea%20why%20this%20isn't%20working%3B%20I've%20opened%20a%20ticket%20with%20Khoros%20on%20it%20but%20thanks%20for%20the%20help.%20I'll%20update%20this%20thread%20when%20I%20get%20a%20reply%20from%20them.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-534170%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-534170%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20must%20not%20add%20the%20.labels.label%20part%20in%20both%20locations.%20Just%20one%20is%20needed.%20I%20recommend%20the%20following%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%26lt%3B%23assign%20contextId%20%3D%20'discovery'%2F%26gt%3B%0A%26lt%3B%23assign%20context%20%3D%20'categories'%2F%26gt%3B%0A%0A%26lt%3B%23--%20MAIN%20LABELS%20--%26gt%3B%0A%26lt%3B%23--%20EX%3A%20%3CA%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%3C%2FA%3E%20--%26gt%3B%0A%26lt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2Fcategories%2Fid%2Fdiscovery%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22).labels.label%20%2F%26gt%3B%0A%20%20%0A%0A%20%20var%20labels%20%3D%20JSON.parse('%24%7BsomeLabels%7D')%3B%0A%20%20console.log('labels'%2Clabels)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAdditionally%2C%20don't%20forget%20to%20wrap%20your%20Javascript%20in%20a%20%3CSCRIPT%3E%20tag%20or%20Khoros%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3B%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BliaAddscript%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20directive.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534167%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534167%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BSadly%2C%20this%20still%20throws%20the%20same%20error.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BIt%20would%20seem%20it%20should%20be%20easier%20than%20this%20to%20get%20something%20that%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20supposedly%20returned%20in%20JSON%20to%20initialize%20a%20JS%20variable%20with%20it...%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20contextId%20%3D%20'discovery'%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20context%20%3D%20'categories'%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20MAIN%20LABELS%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20EX%3A%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%22%20target%3D%22_blank%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bhttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2Fcategories%2Fid%2Fdiscovery%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22).labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%20%20%0A%0A%20%20var%20labels%20%3D%20JSON.parse('%24%7BsomeLabels.labels.label%7D')%3B%0A%20%20console.log('labels'%2Clabels)%3B%0A%20%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bspan%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155984i1D65C748786A931C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bpx%3D999%22%20srcset%3D%22%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155984i1D65C748786A931C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bpx%3D999%201.0x%22%20alt%3D%22Screen%20Shot%202019-07-11%20at%209.17.55%20AM.png%22%20title%3D%22Screen%20Shot%202019-07-11%20at%209.17.55%20AM.png%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fspan%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534076%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534076%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThe%20error%20occurs%2C%20because%20you%20try%20to%20access%20the%20complete%20response%20object.%20But%20this%20is%20not%20supported.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThe%20first%20element%20of%20the%20response%20you%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bre%20able%20to%20access%20is%20the%20label%20array%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B...%0Alabel%3A%20%5B%0A%20...%0A%20...%0A%5D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BTo%20solve%20the%20error%2C%20just%20add%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B.labels.label%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bto%20your%20code%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bvar%20labels%20%3D%20JSON.parse('%24%7BsomeLabels.labels.label%7D')%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThe%20keep%20your%20Javascript%20code%20as%20clean%20as%20possible%2C%20you%20could%20also%20add%20the%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B.labels.label%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bpart%20to%20your%20Rest%20request%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2F%24%7Bcontext%7D%2Fid%2F%24%7BcontextId%7D%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22).labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534009%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534009%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThanks%2C%20but%20I%20can%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20seem%20to%20get%20this%20to%20work%20no%20matter%20what%20I%20do%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BHere%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bs%20the%20JSON%20output%20from%20the%20call%20directly%20from%20the%20browser%3A%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22%20target%3D%22_blank%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bhttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%2Flabels%3Frestapi.response_format%3Djson%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20%0A%0AOUTPUT%3A%20%0A%0A%7B%0A%20%20%22response%22%3A%20%7B%0A%20%20%20%20%22status%22%3A%20%22success%22%2C%0A%20%20%20%20%22labels%22%3A%20%7B%0A%20%20%20%20%20%20%22label%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22label%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22href%22%3A%20%22%5C%2Flabels%5C%2Fid%5C%2F55%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22int%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%2055%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%20%22Data%20Access%20and%20Manipulation%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22label%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22href%22%3A%20%22%5C%2Flabels%5C%2Fid%5C%2F28%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22int%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%2028%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%20%22Data%20Exploration%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRELEVANT%20ENDPOINT%20CODE%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20contextId%20%3D%20'discovery'%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20context%20%3D%20'categories'%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20MAIN%20LABELS%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20EX%3A%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%22%20target%3D%22_blank%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bhttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmin(%22%2F%24%7Bcontext%7D%2Fid%2F%24%7BcontextId%7D%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22)%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0Avar%20labels%20%3D%20JSON.parse('%24%7BsomeLabels%7D')%3B%0Aconsole.log('labels'%2Clabels)%3B%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BOutput%2C%20same%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bspan%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20817px%3B%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bimg%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155907iD6F2C05F40D696C0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bpx%3D999%22%20srcset%3D%22%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155907iD6F2C05F40D696C0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bpx%3D999%201.0x%22%20alt%3D%22Screen%20Shot%202019-07-10%20at%2011.03.01%20AM.png%22%20title%3D%22Screen%20Shot%202019-07-10%20at%2011.03.01%20AM.png%22%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fspan%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BFreemarker%20Error%3A%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-534001%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-534001%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40IanAtJMP%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20-%20You%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bll%20need%20to%20wrap%20your%20Freemarker%20variable%20in%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%2C%20because%20Javascript%20can%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bt%20handle%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%24%7Blabels%7D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FEM%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Band%20will%20run%20into%20errors.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BWhile%20the%20Freemarker%20JSON%20response%20should%20be%20valid%20you%20could%20parse%20the%20response%20with%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BA%20href%3D%22https%3A%2F%2Fdeveloper.mozilla.org%2Fde%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FJSON%2Fparse%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BJSON.parse%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bvar%20labels%20%3D%20JSON.parse('%24%7Blabels%7D')%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-533991%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-533991%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BWill%20try%20that%20out%2C%20thanks.%20Then%20I%20can%20assign%20it%20to%20a%20JS%20variable%20like%20so%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bvar%20labels%20%3D%20%5B%24%7Blabels%7D%5D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-533926%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-533926%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40IanAtJMP%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%20-%20I%20think%20you%20have%20two%20errors%20in%20your%20REST%20call%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BFirstly%2C%20you%20need%20to%20check%20your%20APIv1%20request.%20I%20think%20you%20need%20to%20add%20an%20additional%20%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%2Flabels%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%20path%20parameter%20to%20get%20a%20list%20of%20labels%20for%20your%20category%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20APIv1%20request%3A%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fvc%2Fcategories%2Fid%2F%5Bid%5D%2Flabels%2Flabels%22%20target%3D%22_blank%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bhttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fvc%2Fcategories%2Fid%2F%5Bid%5D%2Flabels%2Flabels%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%20--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%0A%0A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmind(%22%2F%24%7Bcontext%7D%2Fid%2F%24%7BcontextId%7D%2Flabels%2Flabels%3Frestapi.response_format%3Djson%22)%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BTake%20a%20look%20into%20the%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BA%20href%3D%22https%3A%2F%2Fdeveloper.khoros.com%2Fkhoroscommunitydevdocs%2Fdocs%2Fgetting-started-with-api-1%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bdevelopers%20docs%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Band%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BA%20href%3D%22https%3A%2F%2Fdevdocportal.lithium.com%2Ft5%2FCommunity-API-v1-Reference%2Fbd-p%2Frestv1docs%3Fsection%3Dcommv1%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bamp%3Bleaf-id%3DCategory.labels%23Category.labels.labels%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BAPIv1%20reference%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BSecondly%2C%20to%20access%20the%20labels%20from%20the%20API%20response%20you%20need%20to%20access%20the%20labels%20object%20of%20the%20response.%20Your%20request%20will%20return%20something%20similar%20the%20example%20below%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%7B%0A%20%20%22response%22%3A%20%7B%0A%20%20%20%20%22status%22%3A%20%22success%22%2C%0A%20%20%20%20%22labels%22%3A%20%7B%0A%20%20%20%20%20%20%22label%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22label%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22href%22%3A%20%22%2Flabels%2Fid%2F1985%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%20%22Festnetz%20%7C%20Internet%20%7C%20Fernsehen%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22int%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%201985%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22label%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22href%22%3A%20%22%2Flabels%2Fid%2F1982%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22string%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%20%22Sonstiges%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22id%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22int%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22%24%22%3A%201982%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%0A%7D%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BThe%20have%20access%20to%20the%20label%20values%2C%20you%20have%20to%20access%20your%20Freemarker%20variable%20like%20this%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bpre%20class%3D%22lia-code-sample%20language-markup%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20labels%20%3D%20someLabels.labels.label%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fcode%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fpre%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BBe%20aware%20to%20add%20checks%20for%20empty%20responses%20or%20lists.%20Otherwise%20you%20will%20get%20Freemarker%20errors%20for%20accessing%20non-existing%20objects.%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-body%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-sub%20id%3D%22lingo-sub-533828%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3BRe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Flingo-sub%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Blingo-body%20id%3D%22lingo-body-533828%22%20slang%3D%22en-US%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Ba%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F35556%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%40cike%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2Fa%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3BThanks%2C%20however%2C%20I%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bm%20still%20unable%20to%20feed%20that%20directly%20into%20JS.%20To%20wit%3A%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Bnbsp%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BP%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23--%20EX%3A%20%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BA%20href%3D%22https%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%22%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bhttps%3A%2F%2Fcommunity-stage.jmp.com%2Frestapi%2Fv1%2Fcategories%2Fid%2Fdiscovery%2Flabels%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%2FA%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B--%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3B%23assign%20someLabels%20%3D%20restadmind(%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B%2F%24%7Bcontext%7D%2Fid%2F%24%7BcontextId%7D%2Flabels%3Frestapi.response_format%3Djson%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3Bquot%3B)%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3Bscript%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bconsole.log(%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Bscript%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3B)%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Blet%20labels%20%3D%20%5B%24%7BsomeLabels%7D%5D%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3Bconsole.log(%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3Blabels%26amp%3Bamp%3Bamp%3Bamp%3Bamp%3B%2339%3B%2Clabels)%3B%26amp%3Bamp%3Bamp%3Bamp%3Blt%3BBR%20%2F%26amp%3Bamp%3Bamp%3Bamp%3Bgt%3B%3C%2FSCRIPT%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EGets%20me%20a%20freemarker%20error%20%3D%26gt%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20932px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155853iEEAC4700453BE768%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20srcset%3D%22%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F155853iEEAC4700453BE768%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%201.0x%22%20alt%3D%22Screen%20Shot%202019-07-09%20at%209.09.27%20AM.png%22%20title%3D%22Screen%20Shot%202019-07-09%20at%209.09.27%20AM.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHow%20would%20creating%20an%20endpoint%20for%20this%20make%20that%20result%20any%20different%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-533783%22%20slang%3D%22en-US%22%3ERe%3A%20Getting%20an%20API%20V1%20call%20into%20JSON%20I%20can%20use%20in%20Javascript%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-533783%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.khoros.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F62383%22%20target%3D%22_blank%22%3E%40IanAtJMP%3C%2FA%3E%26nbsp%3B%20-%20You%20could%20use%20the%20restapi.response_format%20parameter%20to%20return%20JSON%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3Erestapi.response_format%3Djson%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20more%20details%20see%20%3CA%20href%3D%22https%3A%2F%2Fdeveloper.khoros.com%2Fkhoroscommunitydevdocs%2Fdocs%2Fthe-call-and-response%23section-defining-the-response-format%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Edeveloper%20docs%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlternatively%2C%20you%20can%20move%20your%20API%20requests%20to%20an%20endpoint%20and%20build%20a%20custom%20JSON%20response%20for%20that%20endpoint.%20Afterwards%20you%20can%20request%20your%20endpoint%20from%20your%20JS%20code.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Esteemed Contributor
Esteemed Contributor

Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

I want to get a V1 API call back in a format that I can use as JSON in Javascript in a component. How do I do that? For example:

(/categories/id/categoryName/labels)

<#assign someLabels = restadmin("/${context}/id/${contextId}/labels?restapi.response_format=json").labels.label?sort_by("text")/>
<script>
let someVar = [${someLabels}];
</script>

I know that V2 has the apiv2.toJson() method, but in this case V1 is the only way I know of to get a list of labels from a category, for example. 

Tags (2)
0 Kudos
20 Replies 20
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

@IanAtJMP  - You could use the restapi.response_format parameter to return JSON:

 

restapi.response_format=json

 

For more details see developer docs.

 

Alternatively, you can move your API requests to an endpoint and build a custom JSON response for that endpoint. Afterwards you can request your endpoint from your JS code.

Reply
Loading...
Highlighted
Esteemed Contributor
Esteemed Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

@cike Thanks, however, I'm still unable to feed that directly into JS. To wit:

 

<#-- EX: https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels -->
<#assign someLabels = restadmind("/${context}/id/${contextId}/labels?restapi.response_format=json") />

<script>
console.log('script');
let labels = [${someLabels}];

console.log('labels',labels);
</script>

Gets me a freemarker error => 


Screen Shot 2019-07-09 at 9.09.27 AM.png

 

How would creating an endpoint for this make that result any different?

0 Kudos
Reply
Loading...
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

@IanAtJMP  - I think you have two errors in your REST call:

 

Firstly, you need to check your APIv1 request. I think you need to add an additional "/labels" path parameter to get a list of labels for your category:

 

<#-- APIv1 request: <a href="https://community-stage.jmp.com/restapi/vc/categories/id/[id]/labels/labels" target="_blank">https://community-stage.jmp.com/restapi/vc/categories/id/[id]/labels/labels</a> -->

<#assign someLabels = restadmind("/${context}/id/${contextId}/labels/labels?restapi.response_format=json") />

 

Take a look into the developers docs and APIv1 reference.

 

Secondly, to access the labels from the API response you need to access the labels object of the response. Your request will return something similar the example below:

 

{
  "response": {
    "status": "success",
    "labels": {
      "label": [
        {
          "type": "label",
          "href": "/labels/id/1985",
          "text": {
            "type": "string",
            "$": "Festnetz | Internet | Fernsehen"
          },
          "id": {
            "type": "int",
            "$": 1985
          }
        },
        {
          "type": "label",
          "href": "/labels/id/1982",
          "text": {
            "type": "string",
            "$": "Sonstiges"
          },
          "id": {
            "type": "int",
            "$": 1982
          }
        },
      }
    ]
  }
}

 

 

The have access to the label values, you have to access your Freemarker variable like this:

 

<#assign labels = someLabels.labels.label />

 

 

Be aware to add checks for empty responses or lists. Otherwise you will get Freemarker errors for accessing non-existing objects.

Reply
Loading...
Highlighted
Esteemed Contributor
Esteemed Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

Will try that out, thanks. Then I can assign it to a JS variable like so?

var labels = [${labels}]

0 Kudos
Reply
Loading...
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

@IanAtJMP  - You'll need to wrap your Freemarker variable in "", because Javascript can't handle ${labels} and will run into errors.

While the Freemarker JSON response should be valid you could parse the response with JSON.parse:

var labels = JSON.parse('${labels}')

 

Reply
Loading...
Highlighted
Esteemed Contributor
Esteemed Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

Thanks, but I can't seem to get this to work no matter what I do:

 

Here's the JSON output from the call directly from the browser: 

<a href="https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels/labels?restapi.response_format=json" target="_blank">https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels/labels?restapi.response_format=json</a> 

OUTPUT: 

{
  "response": {
    "status": "success",
    "labels": {
      "label": [
        {
          "type": "label",
          "href": "\/labels\/id\/55",
          "id": {
            "type": "int",
            "$": 55
          },
          "text": {
            "type": "string",
            "$": "Data Access and Manipulation"
          }
        },
        {
          "type": "label",
          "href": "\/labels\/id\/28",
          "id": {
            "type": "int",
            "$": 28
          },
          "text": {
            "type": "string",
            "$": "Data Exploration"
          }
        }
      ]
    }
  }
}

 

RELEVANT ENDPOINT CODE:

<#assign contextId = 'discovery'/>
<#assign context = 'categories'/>

<#-- MAIN LABELS -->
<#-- EX: <a href="https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels" target="_blank">https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels</a> -->
<#assign someLabels = restadmin("/${context}/id/${contextId}/labels/labels?restapi.response_format=json") />

var labels = JSON.parse('${someLabels}');
console.log('labels',labels);

 

Output, same Screen Shot 2019-07-10 at 11.03.01 AM.pngFreemarker Error: 

 

 

0 Kudos
Reply
Loading...
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

The error occurs, because you try to access the complete response object. But this is not supported.

The first element of the response you're able to access is the label array:

...
label: [
 ...
 ...
]

 

To solve the error, just add .labels.label to your code:

var labels = JSON.parse('${someLabels.labels.label}');

 

The keep your Javascript code as clean as possible, you could also add the .labels.label part to your Rest request:

<#assign someLabels = restadmin("/${context}/id/${contextId}/labels/labels?restapi.response_format=json").labels.label />

 

Reply
Loading...
Highlighted
Esteemed Contributor
Esteemed Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

Sadly, this still throws the same error.

It would seem it should be easier than this to get something that's supposedly returned in JSON to initialize a JS variable with it...

<#assign contextId = 'discovery'/>
<#assign context = 'categories'/>

<#-- MAIN LABELS -->
<#-- EX: <a href="https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels" target="_blank">https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels</a> -->
<#assign someLabels = restadmin("/categories/id/discovery/labels/labels?restapi.response_format=json").labels.label />
  

  var labels = JSON.parse('${someLabels.labels.label}');
  console.log('labels',labels);
  

Screen Shot 2019-07-11 at 9.17.55 AM.png

0 Kudos
Reply
Loading...
Highlighted
Honored Contributor Honored Contributor
Honored Contributor

Re: Getting an API V1 call into JSON I can use in Javascript?

Jump to solution

You must not add the .labels.label part in both locations. Just one is needed. I recommend the following:

<#assign contextId = 'discovery'/>
<#assign context = 'categories'/>

<#-- MAIN LABELS -->
<#-- EX: <a href="https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels" target="_blank">https://community-stage.jmp.com/restapi/v1/categories/id/discovery/labels</a> -->
<#assign someLabels = restadmin("/categories/id/discovery/labels/labels?restapi.response_format=json").labels.label />
  

  var labels = JSON.parse('${someLabels}');
  console.log('labels',labels);

 

Additionally, don't forget to wrap your Javascript in a <script> tag or Khoros' <liaAddScript> directive.

Reply
Loading...