Can't use .length in my array data

in my array has two data. but node script can't length it
Data :
image

{"rootId":"0759da852d9fb76f79297e8cfc3d6ce7","requestId":"f396bc7dc58796e5:-644c5706:176e12ece07:-8000:3924","details":{"tlp":2,"caseTemplate":null,"description":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66 at 2021-01-24T03:32:04","tags":["Logthyrhm","Automate"],"lastSyncDate":1611600578646,"customFields":{"alertRule":{"order":0,"string":"AIE: TLI - Command Shell Possible Success"},"application":{"order":1,"string":""},"destinationPort":{"order":3,"string":"80"},"sourcePort":{"order":2,"string":"80"}},"status":"New","severity":2,"title":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66","follow":true},"operation":"Creation","objectId":"0759da852d9fb76f79297e8cfc3d6ce7","startDate":1611600578713,"objectType":"alert","base":true,"object":{"_routing":"0759da852d9fb76f79297e8cfc3d6ce7","date":1611600578000,"severity":2,"customFields":{"alertRule":{"order":0,"string":"AIE: TLI - Command Shell Possible Success"},"application":{"order":1,"string":""},"destinationPort":{"order":3,"string":"80"},"sourcePort":{"order":2,"string":"80"}},"caseTemplate":null,"_type":"alert","description":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66 at 2021-01-24T03:32:04","lastSyncDate":1611600578646,"source":"172.25.5.20","title":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66","type":"Attack","follow":true,"tags":["Logthyrhm","Automate"],"createdAt":1611600578646,"_parent":null,"createdBy":"apiuser","tlp":2,"_id":"0759da852d9fb76f79297e8cfc3d6ce7","id":"0759da852d9fb76f79297e8cfc3d6ce7","sourceRef":"aa51b4","_version":1,"artifacts":[{"tlp":2,"tags":[],"data":"27.75.99.4","ioc":false,"sighted":false,"message":null,"dataType":"ip"},{"tlp":2,"tags":[],"data":"113.53.233.66","ioc":false,"sighted":false,"message":null,"dataType":"ip"}],"status":"New"}}

My code
image

what's wrong ?

Not sure as can not see the objects origin in the image, but maybe it's msg.artifacts

{"rootId":"0759da852d9fb76f79297e8cfc3d6ce7","requestId":"f396bc7dc58796e5:-644c5706:176e12ece07:-8000:3924","details":{"tlp":2,"caseTemplate":null,"description":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66 at 2021-01-24T03:32:04","tags":["Logthyrhm","Automate"],"lastSyncDate":1611600578646,"customFields":{"alertRule":{"order":0,"string":"AIE: TLI - Command Shell Possible Success"},"application":{"order":1,"string":""},"destinationPort":{"order":3,"string":"80"},"sourcePort":{"order":2,"string":"80"}},"status":"New","severity":2,"title":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66","follow":true},"operation":"Creation","objectId":"0759da852d9fb76f79297e8cfc3d6ce7","startDate":1611600578713,"objectType":"alert","base":true,"object":{"_routing":"0759da852d9fb76f79297e8cfc3d6ce7","date":1611600578000,"severity":2,"customFields":{"alertRule":{"order":0,"string":"AIE: TLI - Command Shell Possible Success"},"application":{"order":1,"string":""},"destinationPort":{"order":3,"string":"80"},"sourcePort":{"order":2,"string":"80"}},"caseTemplate":null,"_type":"alert","description":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66 at 2021-01-24T03:32:04","lastSyncDate":1611600578646,"source":"172.25.5.20","title":"AIE: TLI - Command Shell Possible Success from 27.75.99.4 to 113.53.233.66","type":"Attack","follow":true,"tags":["Logthyrhm","Automate"],"createdAt":1611600578646,"_parent":null,"createdBy":"apiuser","tlp":2,"_id":"0759da852d9fb76f79297e8cfc3d6ce7","id":"0759da852d9fb76f79297e8cfc3d6ce7","sourceRef":"aa51b4","_version":1,"artifacts":[{"tlp":2,"tags":[],"data":"27.75.99.4","ioc":false,"sighted":false,"message":null,"dataType":"ip"},{"tlp":2,"tags":[],"data":"113.53.233.66","ioc":false,"sighted":false,"message":null,"dataType":"ip"}],"status":"New"}}

it's all object

msg.payload.object.artifacts

Read this it will tell you how to find paths, using the debug panel.
https://nodered.org/docs/user-guide/messages#understanding-the-structure-of-a-message

1 Like

it's still same
image

Then you are not showing the whole object, is object living inside msg.payload or in just msg ?

Feed the incoming message into a debug node set to show Complete Message and post a screenshot here. Then we will understand what you have.
Have you read and understood the document linked earlier?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.