- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 05:59 AM
Hi ,
I need to separate each of these below arrays into 8 separate arrays so that I can pass these to a method. Now the length shows as the length of total string and not 8.
contentMap received :[
{"column":"u_kb_index","content":"SCOM_CUSTOM_Service-Health_BY0VBV","table":"u_kb_template_gems","number":"KB0022149"},
{"column":"u_kb_source","content":"SCOM","table":"u_kb_template_gems","number":"KB0022149"},
{"column":"u_kb_monitor_description","content":"<p>QA Airwatch API Service is Down<br /><br /> <span style=\"font-family: Calibri;\">Summary: </span><br /><span style=\"font-family: Calibri;\">The Airwatch Application Service or IIS or World Wide Web Publishing Service is not running</span></p>","table":"u_kb_template_gems","number":"KB0022149"}]
Please help.
Thanks in Advance,
Chinmayee Mishra
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 06:21 AM
So that seems to be alright now. You have 8 entries. So length is returning 8?
Then you can loop through that like:
for(var i=0;i<contentArr.length;i++){
gs.info(JSON.stringify(contentArr[i]));
//do something with the object
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 06:18 AM
length of arrayA :[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
This is the log
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2020 06:21 AM
So that seems to be alright now. You have 8 entries. So length is returning 8?
Then you can loop through that like:
for(var i=0;i<contentArr.length;i++){
gs.info(JSON.stringify(contentArr[i]));
//do something with the object
}