How to import JSON array into Data Source?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2025 08:43 PM
I'm trying to import a JSON file into a ServiceNow Data Source, but I'm facing issues with the JSON row path. My JSON file starts as an array, and when I try using /, /[*], or $[*].
JSON structure in attachment is like this:
{
"cve_id": "CVE-1999-0095",
"published": "1988-10-01T04:00:00.000",
"lastModified": "2024-11-20T23:27:50.607",
"description": "The debug command in Sendmail is enabled, allowing attackers to execute commands as root."
},
{
"cve_id": "CVE-1999-0095",
"published": "1988-10-01T04:00:00.000",
"lastModified": "2024-11-20T23:27:50.607",
"description": "The debug command in Sendmail is enabled, allowing attackers to execute commands as root."
}
]
We can have multiple objects in attachment.
I get errors like:
I have also tried this /, /[*], or $[*] still getting same error.
My questions are:
1) Is there a workaround to directly import JSON arrays?
2) What should be the correct Path for each row if attachment consist of array of objects?
Thanks in advance!!!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2025 11:31 AM
Hi,
As the log indicates, the functionality you want isn't achievable. You would need to wrap your JSON in an object
{
"data": [
{
"cve_id": "CVE-1999-0095",
"published": "1988-10-01T04:00:00.000",
"lastModified": "2024-11-20T23:27:50.607",
"description": "The debug command in Sendmail is enabled, allowing attackers to execute commands as root."
},
{
"cve_id": "CVE-1999-0095",
"published": "1988-10-01T04:00:00.000",
"lastModified": "2024-11-20T23:27:50.607",
"description": "The debug command in Sendmail is enabled, allowing attackers to execute commands as root."
}
]
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 11:52 PM
Hi Kieran,
Thanks for your help.
I found the solution—by keeping the JSON data the same and providing the correct path for each row (in my case, //), the issue was resolved. Additionally, I had to click Expand Child Node for it to work correctly.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-18-2025 08:53 AM
Could you share the final outcome? Did you manage to import using the JSON structure you originally provided? or have you nested it inside an object?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2025 09:19 PM
Yes, the JSON structure was the same as I originally provided.
The screenshot below might help you.
If we create our data source in the above way, there is no need to use object.